39 lines
1.2 KiB
VimL
39 lines
1.2 KiB
VimL
|
|
let mapleader = ","
|
|
nmap <silent> <leader>fed :e $VIMHOME/init.vim<cr>
|
|
|
|
nmap <silent> <leader>ex :NERDTree<cr>
|
|
nmap <silent> <leader>exc :NERDTreeClose<cr>
|
|
|
|
" ncm2 autocomplete
|
|
"
|
|
" CTRL-C doesn't trigger the InsertLeave autocmd . map to <ESC> instead.
|
|
" inoremap <c-c> <ESC>
|
|
|
|
" " When the <Enter> key is pressed while the popup menu is visible, it only
|
|
" " hides the menu. Use this mapping to close the menu and also start a new
|
|
" " line.
|
|
" inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")
|
|
|
|
" " Use <TAB> to select the popup menu:
|
|
" inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
" inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
|
|
|
nnoremap <C-p> :Files<space>
|
|
nnoremap <leader>amd :Files $CODE_DIR/auditManager<cr>
|
|
nnoremap <leader>a :Rg<space>
|
|
nnoremap <leader>A :exec "Rg ".expand("<cword>")<cr>
|
|
nmap <leader>to :tabnew<cr>
|
|
nmap <leader>tn :tabnext<cr>
|
|
nmap <leader>tp :tabprevious<cr>
|
|
nmap <leader>tc :tabclose<cr>
|
|
nmap <leader>ob :OpenBookmark<space>
|
|
|
|
command! -bang -nargs=* Rg
|
|
\ call fzf#vim#grep(
|
|
\ 'rg --column --line-number --no-heading --color=always --smart-case -- '.shellescape(<q-args>), 1,
|
|
\ fzf#vim#with_preview(), <bang>0)
|
|
|
|
|
|
autocmd! bufwritepost keybindings.vim source %
|