VIM
This commit is contained in:
parent
21f42a7dfb
commit
46dd020868
3 changed files with 80 additions and 0 deletions
1
.vim/.gitignore
vendored
Normal file
1
.vim/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.netrwhist
|
47
.vim/vimrc
Normal file
47
.vim/vimrc
Normal file
|
@ -0,0 +1,47 @@
|
|||
source ~/.vim/vundlerc.vim
|
||||
|
||||
syntax on
|
||||
filetype plugin indent on
|
||||
|
||||
set omnifunc=syntaxcomplete#Complete
|
||||
|
||||
" unset mouse
|
||||
set mouse=
|
||||
|
||||
" Default tab is 4 spaces
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
|
||||
" Highlight searches
|
||||
set hlsearch
|
||||
set showmatch
|
||||
|
||||
" Use TAB to switch between buffers
|
||||
noremap <tab> :bn<CR>
|
||||
noremap <S-tab> :bp<CR>
|
||||
|
||||
" Highlight trailing whitespace (darker red)
|
||||
highlight WhitespaceEOL ctermbg=124* guibg=#ab0d0d
|
||||
match WhitespaceEOL /\s\+\%#\@<!$/
|
||||
|
||||
" Remove all trailing whitespace by pressing Ctrl+k
|
||||
nnoremap <C-k> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>
|
||||
autocmd FileType rst set textwidth=79
|
||||
autocmd FileType html set softtabstop=2 shiftwidth=2 omnifunc=htmlcomplete#CompleteTags
|
||||
autocmd FileType yaml set softtabstop=2 shiftwidth=2
|
||||
autocmd FileType css set softtabstop=2 shiftwidth=2 omnifunc=csscomplete#CompleteCSS
|
||||
|
||||
" Toggles on different plugins/modes
|
||||
noremap <F1> :ToggleMouse<CR>
|
||||
inoremap <F1> <Esc>:ToggleMouse<CR>a
|
||||
nmap <F3> :set nonumber!<CR>
|
||||
nmap <F5> :NERDTreeToggle<CR>
|
||||
set pastetoggle=<F2>
|
||||
|
||||
" Enable vimrc files per project, e.g: ./project/.vimrc
|
||||
set exrc
|
||||
|
||||
" Disable unsafe commands in project vimrc
|
||||
set secure
|
32
.vim/vundlerc.vim
Normal file
32
.vim/vundlerc.vim
Normal file
|
@ -0,0 +1,32 @@
|
|||
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||
" :VundleInstall
|
||||
"
|
||||
|
||||
filetype off
|
||||
|
||||
" set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
|
||||
" let Vundle manage Vundle, required
|
||||
Plugin 'VundleVim/Vundle.vim'
|
||||
|
||||
" NERDTree config
|
||||
Plugin 'scrooloose/nerdtree'
|
||||
let NERDTreeHighlightCursorLine=1
|
||||
let NERDTreeMouseMode=2
|
||||
let NERDTreeIgnore=['\.pyc$', '\.jp?g$', '\.gif$', '\.png$', '\~$', '\.o', '\.log']
|
||||
|
||||
" Scala config
|
||||
Plugin 'derekwyatt/vim-scala'
|
||||
let g:scala_scaladoc_indent = 1
|
||||
|
||||
Plugin 'elmcast/elm-vim'
|
||||
Plugin 'rust-lang/rust.vim'
|
||||
|
||||
" Async Lint Engine
|
||||
Plugin 'w0rp/ale'
|
||||
let g:ale_linters = {'rust': ['rustc']}
|
||||
let g:ale_completion_enabled = 1
|
||||
|
||||
call vundle#end()
|
Loading…
Add table
Reference in a new issue