config/nvim: fully diabls Ex mode & add indentation conversion shortcut

This commit is contained in:
xeruf 2021-12-02 23:29:26 +01:00
parent e536dc3f4e
commit a52bb7a1e2
1 changed files with 4 additions and 1 deletions

View File

@ -7,13 +7,16 @@ command! WS write <bar> source $MYVIMRC
command! FormatJSON %!python -m json.tool command! FormatJSON %!python -m json.tool
command! DiffSwap :diffsp % " Diff for swap - superseded by 'chrisbra/Recover.vim' command! DiffSwap :diffsp % " Diff for swap - superseded by 'chrisbra/Recover.vim'
" takes an indented code block and surrounds it in backticks instead " Replace an code block indentation by backtick encasement
let @c = '/^\n i```Ni```j0/``` lllkxNA' let @c = '/^\n i```Ni```j0/``` lllkxNA'
" Replace double-space indentation by tabs
let @t = ':%s/^\(\(\t\)*\) /\1\t/g :%s/^\(\(\t\)*\) /\1\t/g :%s/^\(\(\t\)*\) /\1\t/g :%s/^\(\(\t\)*\) /\1\t/g :%s/^\(\(\t\)*\) /\1\t/g '
" Sane yanking " Sane yanking
map Y y$ map Y y$
" Disable Ex mode - https://vi.stackexchange.com/q/457 " Disable Ex mode - https://vi.stackexchange.com/q/457
nnoremap Q @q nnoremap Q @q
noremap q: <Nop>
" Alias replace all to S " Alias replace all to S
nnoremap S :%s//gI<Left><Left><Left> nnoremap S :%s//gI<Left><Left><Left>