Added more hard way config
parent
864a4a2f08
commit
21af2f55f3
6
init.vim
6
init.vim
|
@ -1,6 +1,8 @@
|
||||||
" Change leader key to space
|
" Change leader key to space
|
||||||
" I run this before anything else so that <leader> is always the right value
|
" Map leader to space
|
||||||
let mapleader = ' '
|
let g:mapleader = ' '
|
||||||
|
" Map local leader to tab
|
||||||
|
let g:maplocalleader = "\<tab>"
|
||||||
|
|
||||||
" Source plugins
|
" Source plugins
|
||||||
runtime! init/*.vim
|
runtime! init/*.vim
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
augroup langs
|
||||||
|
autocmd!
|
||||||
|
" Remove trailing whitespace
|
||||||
|
autocmd BufWritePre *.py,*.java :silent! %s/\s\+$//g
|
||||||
|
augroup END
|
|
@ -73,3 +73,7 @@ nnoremap <silent> <leader>c :call ColorschemeToggle()<CR>
|
||||||
nnoremap <silent> <leader>vs :source $MYVIMRC<CR>
|
nnoremap <silent> <leader>vs :source $MYVIMRC<CR>
|
||||||
" Open CtrlP in config directory
|
" Open CtrlP in config directory
|
||||||
nnoremap <silent> <leader>ve :split<CR>:exec 'CtrlP ' . fnamemodify($MYVIMRC, ':h')<CR>
|
nnoremap <silent> <leader>ve :split<CR>:exec 'CtrlP ' . fnamemodify($MYVIMRC, ':h')<CR>
|
||||||
|
|
||||||
|
" Overwrite Esc (experiment)
|
||||||
|
inoremap jk <Esc>
|
||||||
|
inoremap <Esc> <nop>
|
||||||
|
|
|
@ -32,4 +32,7 @@ Plug 'yggdroot/indentline'
|
||||||
" Auto-indent according to PEP8 rules
|
" Auto-indent according to PEP8 rules
|
||||||
Plug 'hynek/vim-python-pep8-indent'
|
Plug 'hynek/vim-python-pep8-indent'
|
||||||
|
|
||||||
|
" Text object based on current indent level (e.g. Python)
|
||||||
|
Plug 'michaeljsmith/vim-indent-object'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
|
@ -53,8 +53,5 @@ set nobackup
|
||||||
set undofile
|
set undofile
|
||||||
set undodir=./.vim/undo//
|
set undodir=./.vim/undo//
|
||||||
|
|
||||||
" Detect comments in json
|
|
||||||
autocmd FileType json syntax match Comment +\/\/.\+$+
|
|
||||||
|
|
||||||
" Increases speed of CoC and Gitgutter
|
" Increases speed of CoC and Gitgutter
|
||||||
set updatetime=250
|
set updatetime=250
|
||||||
|
|
|
@ -1,10 +1,18 @@
|
||||||
" Navigating between tags
|
" Navigating between tags
|
||||||
" Go to next one
|
" Go to next top-level tag
|
||||||
let g:tagbar_map_nexttag = 'j'
|
let g:tagbar_map_nexttag = 'J'
|
||||||
" Go to previous one
|
" Same, but previous
|
||||||
let g:tagbar_map_prevtag = 'k'
|
let g:tagbar_map_prevtag = 'K'
|
||||||
" Show prototype of current tag
|
" Show prototype of current tag
|
||||||
let g:tagbar_map_showproto = 'u'
|
let g:tagbar_map_showproto = 'u'
|
||||||
|
" Use order from source file
|
||||||
|
let g:tagbar_sort = 0
|
||||||
|
" Don't show help tip at the top
|
||||||
|
let g:tagbar_compact = 1
|
||||||
|
" Auto-open folds while following cursor
|
||||||
|
let g:tagbar_autoshowtag = 1
|
||||||
|
" Don't show status line
|
||||||
|
let g:no_status_line = 1
|
||||||
|
|
||||||
" Open tagbar when opening certain language types
|
" Open tagbar when opening certain language types
|
||||||
autocmd BufNewFile,BufReadPre *.py,*.java,*.rs,*.cpp,*.c TagbarOpen
|
autocmd BufNewFile,BufReadPre *.py,*.java,*.rs,*.cpp,*.c TagbarOpen
|
||||||
|
|
Reference in New Issue