|
@ -62,6 +62,11 @@ call plug#begin() |
|
|
Plug 'lervag/vimtex' |
|
|
Plug 'lervag/vimtex' |
|
|
Plug 'Valloric/YouCompleteMe' |
|
|
Plug 'Valloric/YouCompleteMe' |
|
|
Plug 'preservim/nerdtree' |
|
|
Plug 'preservim/nerdtree' |
|
|
|
|
|
"Plug 'liuchengxu/vim-which-key' |
|
|
|
|
|
Plug 'godlygeek/tabular' |
|
|
|
|
|
Plug 'preservim/vim-markdown' |
|
|
|
|
|
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} |
|
|
|
|
|
Plug 'https://github.com/godlygeek/tabular' |
|
|
call plug#end() |
|
|
call plug#end() |
|
|
|
|
|
|
|
|
" Theme configuration |
|
|
" Theme configuration |
|
@ -99,3 +104,23 @@ nnoremap <C-n> :NERDTree<CR> |
|
|
nnoremap <C-t> :NERDTreeToggle<CR> |
|
|
nnoremap <C-t> :NERDTreeToggle<CR> |
|
|
nnoremap <C-f> :NERDTreeFind<CR> |
|
|
nnoremap <C-f> :NERDTreeFind<CR> |
|
|
let g:NERDTreeQuitOnOpen = 1 |
|
|
let g:NERDTreeQuitOnOpen = 1 |
|
|
|
|
|
" Whichkey |
|
|
|
|
|
set timeoutlen=500 |
|
|
|
|
|
"let g:mapleader = "\<Space>" |
|
|
|
|
|
"let g:maplocalleader = ',' |
|
|
|
|
|
"nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR> |
|
|
|
|
|
"nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR> |
|
|
|
|
|
|
|
|
|
|
|
" Tabularize |
|
|
|
|
|
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a |
|
|
|
|
|
|
|
|
|
|
|
function! s:align() |
|
|
|
|
|
let p = '^\s*|\s.*\s|\s*$' |
|
|
|
|
|
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p) |
|
|
|
|
|
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g')) |
|
|
|
|
|
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*')) |
|
|
|
|
|
Tabularize/|/l1 |
|
|
|
|
|
normal! 0 |
|
|
|
|
|
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) |
|
|
|
|
|
endif |
|
|
|
|
|
endfunction |