Set filetype to unix

This commit is contained in:
Oliver Hartmann 2018-12-22 17:42:33 +01:00
parent 95a0b8e81d
commit 5b31e85e6a

182
init.vim
View File

@ -1,90 +1,92 @@
" =============Plugins================== " =============Plugins==================
call plug#begin() call plug#begin()
Plug 'morhetz/gruvbox' Plug 'morhetz/gruvbox'
Plug 'tomtom/tcomment_vim' Plug 'tomtom/tcomment_vim'
Plug 'bling/vim-airline' Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes' Plug 'vim-airline/vim-airline-themes'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter' Plug 'airblade/vim-gitgutter'
Plug 'Shougo/neosnippet.vim' Plug 'Shougo/neosnippet.vim'
Plug 'honza/vim-snippets' Plug 'honza/vim-snippets'
Plug 'vim-scripts/a.vim' Plug 'vim-scripts/a.vim'
call plug#end() call plug#end()
" =============Settings================== " =============Settings==================
filetype plugin on filetype plugin on
filetype indent on filetype indent on
set nocompatible set nocompatible
set ignorecase " Case sensitive off set ignorecase " Case sensitive off
set incsearch set incsearch
set encoding=utf-8 set encoding=utf-8
set nobackup set nobackup
set noswapfile set noswapfile
set mouse=a set mouse=a
set spelllang=en,de set spelllang=en,de
set spellsuggest=double,10 set spellsuggest=double,10
set list set list
set icon set icon
set listchars=tab:>.,trail:.,extends:#,nbsp:. set listchars=tab:>.,trail:.,extends:#,nbsp:.
set showmatch " Show pair braces set showmatch " Show pair braces
set hlsearch "Highlight search set hlsearch "Highlight search
syntax on syntax on
set number set number
set scrolloff=2 set scrolloff=2
if has("win32") if has("win32")
" set rop=type:directx " set rop=type:directx
let g:loaded_matchparen = 1 let g:loaded_matchparen = 1
end end
" =================Look and feel======================= " =================Look and feel=======================
colorscheme gruvbox colorscheme gruvbox
" =================Windows and Tabs==================== " =================Windows and Tabs====================
" Open a new tab with F2 " Open a new tab with F2
map <F2> <Esc>:tabnew <CR><ESC>:Explore<CR> map <F2> <Esc>:tabnew <CR><ESC>:Explore<CR>
imap <F2> <Esc>:tabnew <CR><ESC>:Explore<CR> imap <F2> <Esc>:tabnew <CR><ESC>:Explore<CR>
map <S-Right> :tabnext<CR> map <S-Right> :tabnext<CR>
map <S-Left> :tabprevious<CR> map <S-Left> :tabprevious<CR>
nmap <silent> <A-Up> :wincmd k<CR> nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR> nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR> nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR> nmap <silent> <A-Right> :wincmd l<CR>
" Open a new vertical split window with Ctrl - F2 " Open a new vertical split window with Ctrl - F2
map <C-F2> <Esc>:vsplit .<CR> map <C-F2> <Esc>:vsplit .<CR>
imap <C-F2> <Esc>:vsplit .<CR> imap <C-F2> <Esc>:vsplit .<CR>
" Open a new horizontal split window with Shift - F2 " Open a new horizontal split window with Shift - F2
map <S-F2> <Esc>:split .<CR> map <S-F2> <Esc>:split .<CR>
imap <S-F2> <Esc>:split .<CR> imap <S-F2> <Esc>:split .<CR>
" =================save shortcut======================= " ======================shortcut=======================
map <C-S> <ESC>:wa<CR> map <C-S> <ESC>:wa<CR>
imap <C-S> <ESC>:wa<CR> imap <C-S> <ESC>:wa<CR>
"Jump to last modification line
" =================Comments============================ map ö `.
map <C-C> :TComment<CR>
" =================Comments============================
" =================Python============================== map <C-C> :TComment<CR>
let g:python3_host_prog="f:\\Tools\\Python\\python.exe"
let g:python_host_prog="f:\\Tools\\Python27\\python.exe" " =================Python==============================
let g:python3_host_prog="f:\\Tools\\Python\\python.exe"
" =========================Deoplete==================== let g:python_host_prog="f:\\Tools\\Python27\\python.exe"
let g:deoplete#enable_at_startup = 1
" =========================neosnippet================== " =========================Deoplete====================
" " Enable snipMate compatibility feature. let g:deoplete#enable_at_startup = 1
let g:neosnippet#enable_snipmate_compatibility = 1 " =========================neosnippet==================
" Tell Neosnippet about the other snippets " " Enable snipMate compatibility feature.
let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets' let g:neosnippet#enable_snipmate_compatibility = 1
imap <expr><TAB> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>" " Tell Neosnippet about the other snippets
smap <expr><TAB> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>" let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets'
" =====================A====================== imap <expr><TAB> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>"
" Function for switching between header and c* files smap <expr><TAB> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
map <F5> :wa <CR> :A<CR> " =====================A======================
imap <F5> <Esc>:wa<CR>:A<CR>i " Function for switching between header and c* files
map <C-F5> :AV<CR> map <F5> :wa <CR> :A<CR>
imap <C-F5> <Esc>:AV<CR>i imap <F5> <Esc>:wa<CR>:A<CR>i
map <S-F5> :AT<CR> map <C-F5> :AV<CR>
imap <S-F5> <Esc>:AT<CR>i imap <C-F5> <Esc>:AV<CR>i
let g:alternateSearchPath = 'sfr:../source,sfr:../src,sfr:../include,../../include,sfr:../inc,sfr:../h' map <S-F5> :AT<CR>
" Dont create the file if the .cpp or .h is not found imap <S-F5> <Esc>:AT<CR>i
let g:alternateNoDefaultAlternate = 1 let g:alternateSearchPath = 'sfr:../source,sfr:../src,sfr:../include,../../include,sfr:../inc,sfr:../h'
" Dont create the file if the .cpp or .h is not found
let g:alternateNoDefaultAlternate = 1