Remove non-working comment formatting keybindings

This commit is contained in:
Kevin MacMartin 2024-02-23 15:40:36 -05:00
parent ee6d30175a
commit ad59ae0762
2 changed files with 0 additions and 14 deletions

View file

@ -135,8 +135,6 @@ alias zless="$PAGER"
| Leader+t | N | Convert all tabs into spaces and continue session with spaces | | Leader+t | N | Convert all tabs into spaces and continue session with spaces |
| Leader+T | N | Convert all spaces into tabs and continue session with tabs | | Leader+T | N | Convert all spaces into tabs and continue session with tabs |
| Leader+w | N | Remove all trailing whitespace | | Leader+w | N | Remove all trailing whitespace |
| Leader+A | N+V | Align comments in document/selection |
| Leader+a | N+V | Align comments following non-comments in document/selection |
#### GVim #### GVim

View file

@ -137,10 +137,6 @@
" <Leader>t | (N) -> convert tabs into spaces " <Leader>t | (N) -> convert tabs into spaces
" <Leader>T | (N) -> convert spaces into tabs " <Leader>T | (N) -> convert spaces into tabs
" <Leader>w | (N) -> remove whitespace " <Leader>w | (N) -> remove whitespace
" <Leader>A | (N) -> aligns comments using the comment symbol
" <Leader>A | (V) -> aligns selected comments
" <Leader>a | (N) -> aligns all comments after text
" <Leader>a | (V) -> aligns selected comments after text
" <Tab> | (V) -> indent all the lines currently selected " <Tab> | (V) -> indent all the lines currently selected
" <Tab> | (N) -> indent the current line " <Tab> | (N) -> indent the current line
" <Leader>> | (V) -> indent all the lines currently selected " <Leader>> | (V) -> indent all the lines currently selected
@ -567,14 +563,6 @@
"remove trailing whitespace "remove trailing whitespace
nnoremap <silent><expr> <Leader>w ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>' nnoremap <silent><expr> <Leader>w ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
"align comments
nnoremap <Leader>A :exe "%Tabular" '/^[^'.matchstr(&commentstring, '[^%]*').']*\zs'.matchstr(&commentstring, '[^%]*').'.*'<CR>:redraw!<CR>
vnoremap <Leader>A <C-u>:exe "'<,'>Tabular" '/^[^'.matchstr(&commentstring, '[^%]*').']*\zs'.matchstr(&commentstring, '[^%]*').'.*'<CR>:redraw!<CR>
"align only comments following non-comments
nnoremap <Leader>a :exe "%Tabular" '/^ *[^'.matchstr(&commentstring, '[^%]*').' ][^\'.matchstr(&commentstring, '[^%]*').']*\zs'.matchstr(&commentstring, '[^%]*').'.*'<CR>:redraw!<CR>
vnoremap <Leader>a <C-u>:exe "'<,'>Tabular" '/^ *[^'.matchstr(&commentstring, '[^%]*').' ][^\'.matchstr(&commentstring, '[^%]*').']*\zs'.matchstr(&commentstring, '[^%]*').'.*'<CR>:redraw!<CR>
"tab/<Leader>> and untab/<Leader>< the currently selected lines "tab/<Leader>> and untab/<Leader>< the currently selected lines
vnoremap <Tab> >gv vnoremap <Tab> >gv
nnoremap <Tab> v>gv<Esc> nnoremap <Tab> v>gv<Esc>