Change some vim mappings
This commit is contained in:
parent
1a46964bd7
commit
f19e84e1a5
62
vimrc
62
vimrc
|
@ -1,4 +1,4 @@
|
|||
"-----------------------------------------------------------------------------------------------------------------------
|
||||
"-----------------------------------------------------------------------------------------------------------------------
|
||||
" The config is chopped up into sections. Search for these headings to quickly jump to a particular section.
|
||||
"
|
||||
" #0 GLOBALS
|
||||
|
@ -237,12 +237,14 @@ Plug 'ctrlpvim/ctrlp.vim' " Fuzzy file, buffer, mru, tag, etc finder
|
|||
Plug 'majutsushi/tagbar' " Display ctags in a window, ordered by scope.
|
||||
Plug 'tommcdo/vim-lion' " For text alignment, use gl= and gL=
|
||||
Plug 'tpope/tpope-vim-abolish' " Easily search for, substitute, and abbreviate multiple variants of a word. Add them to `vim/after/plugin/abolish.vim`
|
||||
Plug 'vim-scripts/AnsiEsc.vim' " Ansi escape sequences concealed, but highlighted as specified.
|
||||
Plug 'sir-pinecone/errormarker.vim' " Build error highlighting (requires skywind3000/asyncrun.vim).
|
||||
Plug 'skywind3000/asyncrun.vim' " Async commands.
|
||||
Plug 'nelstrom/vim-qargs' " For the GlobalReplaceIt function (i.e. search and replace).
|
||||
Plug 'editorconfig/editorconfig-vim' " Adds support for .editorconfig files.
|
||||
|
||||
" @flagged for removal
|
||||
Plug 'sir-pinecone/AnsiEsc.vim' " Ansi escape sequences concealed, but highlighted as specified.
|
||||
|
||||
if IsWindows()
|
||||
Plug 'suxpert/vimcaps' " Disable capslock (useful if the OS isn't configured to do so).
|
||||
endif
|
||||
|
@ -382,7 +384,7 @@ endif
|
|||
|
||||
set list listchars=tab:»·,trail:· " Show trailing whitespace.
|
||||
|
||||
set timeoutlen=300 ttimeoutlen=0 " Adding this since the esc remap on the 'i' key had a long delay when pressed.
|
||||
set timeoutlen=250 ttimeoutlen=0 " Don't set it too low otherwise you won't be able to type use multi-key sequences.
|
||||
|
||||
" @fixme might be broken if lowered to 100 from original value of 4000. Will
|
||||
" first try 500 and tweak from there.
|
||||
|
@ -531,6 +533,26 @@ augroup END
|
|||
"|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
"|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
|
||||
" Note: if there are two+ mappings that start with the same sequence then vim
|
||||
" will introduce a delay before the mapping is handled in order to wait for
|
||||
" the entire sequence to be typed. e.g. <leader>s and <leader>sg will
|
||||
" introduce a timeout delay, which will be noticed when you're trying to use
|
||||
" <leader>s. If you type <leader>sg then it'll be handled immediately, unless
|
||||
" there is a third mapping with that initial sequence, e.g. <leader>sgn.
|
||||
"
|
||||
" You can adjust the timeout duration by modidying the timeoutlen option.
|
||||
"
|
||||
" You can see when a keysequence is mapped to by entering :map <sequence>
|
||||
" e.g. :map ,s
|
||||
" This is helpful when you are experiencing a timeout but you only have one
|
||||
" mapping defined in your vimrc. It's likely that a plugin added a similar
|
||||
" mapping sequence.
|
||||
"
|
||||
" The difference between map and noremap is that the former does recursive
|
||||
" expansion and the latter doesn't. The expansion means that if the mapped key
|
||||
" sequence contains any mappings then those mappings will be expanded as well.
|
||||
" This can lead to issues and confusion, so it's best to use noremap unless
|
||||
" you really have a reason not to.
|
||||
|
||||
"##################################################################################
|
||||
" MISC
|
||||
|
@ -601,7 +623,7 @@ noremap <leader>p "+p
|
|||
noremap <leader>pp :set paste! paste?<cr>
|
||||
|
||||
" Toggle line numbers.
|
||||
noremap <leader>o :set number! number?<cr>
|
||||
nnoremap <leader>o :set number! number?<cr>
|
||||
|
||||
" Show spell checking.
|
||||
" You can add new entries to the dict by moving the cursor over the word and pressing `zg`.
|
||||
|
@ -885,14 +907,6 @@ noremap <leader>gb :Git blame -w<cr>
|
|||
command! -bar -bang -nargs=* Blame :Git blame<bang> -wCM <args>
|
||||
command! -bar -bang -nargs=* Gblame :Git blame<bang> -wCM <args>
|
||||
|
||||
"##################################################################################
|
||||
" GIST VIM
|
||||
"##################################################################################
|
||||
let g:gist_detect_filetype = 1
|
||||
let g:gist_open_browser_after_post = 1
|
||||
let g:gist_show_privates = 1
|
||||
let g:gist_post_private = 1
|
||||
|
||||
"##################################################################################
|
||||
" VIM-CLOJURE-STATIC
|
||||
"##################################################################################
|
||||
|
@ -1383,33 +1397,33 @@ endfunction
|
|||
"/////////////////////////////////////////////////
|
||||
|
||||
" Case insensitive:
|
||||
noremap <leader>s :call Search('.', g:campo_custom_search_args, 1)<cr>
|
||||
nnoremap <leader>s :call Search('.', g:campo_custom_search_args, 1)<cr>
|
||||
" Case sensitive:
|
||||
noremap <leader>ss :call Search('.', g:campo_custom_search_args)<cr>
|
||||
nnoremap <leader>ss :call Search('.', g:campo_custom_search_args)<cr>
|
||||
|
||||
"/////////////////////////////////////////////////
|
||||
" SEARCH IN DIRECTORY CONTAINING THE ACTIVE FILE
|
||||
"/////////////////////////////////////////////////
|
||||
|
||||
" Case insensitive:
|
||||
noremap <leader>sf :call Search(expand('%:p:h'), g:campo_custom_search_args, 1)<cr>
|
||||
nnoremap <leader>sf :call Search(expand('%:p:h'), g:campo_custom_search_args, 1)<cr>
|
||||
" Case sensitive:
|
||||
noremap <leader>ssf :call Search(expand('%:p:h'), g:campo_custom_search_args)<cr>
|
||||
nnoremap <leader>ssf :call Search(expand('%:p:h'), g:campo_custom_search_args)<cr>
|
||||
|
||||
"/////////////////////////////////////////////////
|
||||
" SEARCH IN JAI FOLDERS
|
||||
"/////////////////////////////////////////////////
|
||||
|
||||
" Case insensitive:
|
||||
noremap <leader>sg :call Search(g:campo_jai_path, g:campo_custom_search_args, 1)<cr>
|
||||
noremap <leader>sm :call Search(g:campo_jai_path . '/modules', g:campo_custom_search_args, 1)<cr>
|
||||
noremap <leader>sh :call Search(g:campo_jai_path . '/how_to', g:campo_custom_search_args, 1)<cr>
|
||||
noremap <leader>se :call Search(g:campo_jai_path . '/examples', g:campo_custom_search_args, 1)<cr>
|
||||
nnoremap <leader>sg :call Search(g:campo_jai_path, g:campo_custom_search_args, 1)<cr>
|
||||
nnoremap <leader>sm :call Search(g:campo_jai_path . '/modules', g:campo_custom_search_args, 1)<cr>
|
||||
nnoremap <leader>sh :call Search(g:campo_jai_path . '/how_to', g:campo_custom_search_args, 1)<cr>
|
||||
nnoremap <leader>se :call Search(g:campo_jai_path . '/examples', g:campo_custom_search_args, 1)<cr>
|
||||
" Case sensitive:
|
||||
noremap <leader>ssg :call Search(g:campo_jai_path, g:campo_custom_search_args)<cr>
|
||||
noremap <leader>ssm :call Search(g:campo_jai_path . '/modules', g:campo_custom_search_args)<cr>
|
||||
noremap <leader>ssh :call Search(g:campo_jai_path . '/how_to', g:campo_custom_search_args)<cr>
|
||||
noremap <leader>sse :call Search(g:campo_jai_path . '/examples', g:campo_custom_search_args)<cr>
|
||||
nnoremap <leader>ssg :call Search(g:campo_jai_path, g:campo_custom_search_args)<cr>
|
||||
nnoremap <leader>ssm :call Search(g:campo_jai_path . '/modules', g:campo_custom_search_args)<cr>
|
||||
nnoremap <leader>ssh :call Search(g:campo_jai_path . '/how_to', g:campo_custom_search_args)<cr>
|
||||
nnoremap <leader>sse :call Search(g:campo_jai_path . '/examples', g:campo_custom_search_args)<cr>
|
||||
|
||||
" Navigation for the vim-ripgrep search results.
|
||||
" Hit o on a result line to open the file at that line.
|
||||
|
|
Loading…
Reference in New Issue
Block a user