mirror of
https://github.com/prurigro/darkcloud-vimconfig.git
synced 2024-11-22 22:54:11 -05:00
<Leader><Ctrl-l> now formats the doc/selection to a width of 79 chars,
autoformat is now <leader><leader><c-f>, > and < are no longer bound to tab/untab (they were interfering with >> and << for diff), and the mapping to create a new tab with vim filer is now <A-c> (create) as Alt-f is the default search results clear command
This commit is contained in:
parent
2c8b3069e5
commit
b083ac0e91
1 changed files with 193 additions and 184 deletions
|
@ -66,7 +66,7 @@
|
||||||
" <Alt-n> | (N) -> go to the next open tab
|
" <Alt-n> | (N) -> go to the next open tab
|
||||||
" <Alt-p> | (N) -> go to the previous open tab
|
" <Alt-p> | (N) -> go to the previous open tab
|
||||||
" <Alt-t> | (N) -> open a new tab
|
" <Alt-t> | (N) -> open a new tab
|
||||||
" <Alt-f> | (N) -> create a new tab with vimfiler
|
" <Alt-c> | (N) -> create a new tab with vimfiler
|
||||||
" <Alt-d> | (N) -> create a new tab with a double pane vimfiler
|
" <Alt-d> | (N) -> create a new tab with a double pane vimfiler
|
||||||
"
|
"
|
||||||
" (toggles)
|
" (toggles)
|
||||||
|
@ -105,11 +105,13 @@
|
||||||
"
|
"
|
||||||
" (formatting)
|
" (formatting)
|
||||||
" <Backspace> | (V) -> deletes currently selected text
|
" <Backspace> | (V) -> deletes currently selected text
|
||||||
" <Leader><C-a> | (N) -> format document using :Autoformat
|
" <Leader><Ctrl-f> | (N) -> format document and return to cursor
|
||||||
" <Leader><C-f> | (V) -> format the selection and return to cursor
|
" <Leader><Ctrl-f> | (V) -> format the selection and return to cursor
|
||||||
" <Leader><C-f> | (N) -> format document and return to cursor
|
" <Leader><Leader><Ctrl-f> | (N) -> format document using :Autoformat
|
||||||
" <Leader><C-w> | (N) -> remove whitespace
|
" <Leader><Ctrl-l> | (N) -> format document to a width of 79 characters
|
||||||
" <Leader><C-t> | (N) -> convert tabs into spaces
|
" <Leader><Ctrl-l> | (V) -> format selection to a width of 79 characters
|
||||||
|
" <Leader><Ctrl-w> | (N) -> remove whitespace
|
||||||
|
" <Leader><Ctrl-t> | (N) -> convert tabs into spaces
|
||||||
" <Leader>\ | (N) -> remove search highlighting
|
" <Leader>\ | (N) -> remove search highlighting
|
||||||
" <Leader><Esc> | (N) -> an alt mapping to remove search highlighting
|
" <Leader><Esc> | (N) -> an alt mapping to remove search highlighting
|
||||||
" <Tab> | (V) -> indent all the lines currently selected
|
" <Tab> | (V) -> indent all the lines currently selected
|
||||||
|
@ -254,6 +256,11 @@
|
||||||
" n | (A) -> start editing a new file
|
" n | (A) -> start editing a new file
|
||||||
"
|
"
|
||||||
|
|
||||||
|
"DISABLED DEFAULT MAPPING: UNSET SHORTCUTS {{{
|
||||||
|
noremap > <Nop>
|
||||||
|
noremap < <Nop>
|
||||||
|
"}}}
|
||||||
|
|
||||||
"ALIASES: COMMAND SHORTCUTS {{{
|
"ALIASES: COMMAND SHORTCUTS {{{
|
||||||
cabbrev <expr><silent> GitLog ':Extradite<CR>:wincmd x<CR>:wincmd j<CR>:resize 10<CR>'
|
cabbrev <expr><silent> GitLog ':Extradite<CR>:wincmd x<CR>:wincmd j<CR>:resize 10<CR>'
|
||||||
cabbrev <expr><silent> gitlog ':Extradite<CR>:wincmd x<CR>:wincmd j<CR>:resize 10<CR>'
|
cabbrev <expr><silent> gitlog ':Extradite<CR>:wincmd x<CR>:wincmd j<CR>:resize 10<CR>'
|
||||||
|
@ -335,7 +342,7 @@
|
||||||
nnoremap <silent><expr> <A-n> ':tabnext<CR>'
|
nnoremap <silent><expr> <A-n> ':tabnext<CR>'
|
||||||
nnoremap <silent><expr> <A-p> ':tabprev<CR>'
|
nnoremap <silent><expr> <A-p> ':tabprev<CR>'
|
||||||
nnoremap <silent><expr> <A-t> ':tabnew<CR>'
|
nnoremap <silent><expr> <A-t> ':tabnew<CR>'
|
||||||
nnoremap <silent><expr> <A-f> ':VimFiler -tab -project<CR>'
|
nnoremap <silent><expr> <A-c> ':VimFiler -tab -project<CR>'
|
||||||
nnoremap <silent><expr> <A-d> ':VimFiler -tab -project -double<CR>'
|
nnoremap <silent><expr> <A-d> ':VimFiler -tab -project -double<CR>'
|
||||||
"}
|
"}
|
||||||
|
|
||||||
|
@ -444,9 +451,11 @@
|
||||||
vnoremap <Backspace> "_x
|
vnoremap <Backspace> "_x
|
||||||
|
|
||||||
"formatting options to apply to the whole document
|
"formatting options to apply to the whole document
|
||||||
noremap <Leader><C-a> :Autoformat<CR><CR>:echo "The selection has been formatted with :Autoformat"<CR>
|
|
||||||
nnoremap <Leader><C-f> mzgg=G`z<CR>:echo "The document has been formatted"<CR>
|
nnoremap <Leader><C-f> mzgg=G`z<CR>:echo "The document has been formatted"<CR>
|
||||||
vnoremap <Leader><C-f> mz=`z<CR>:echo "The selection has been formatted"<CR>
|
vnoremap <Leader><C-f> mz=`z<CR>:echo "The selection has been formatted"<CR>
|
||||||
|
nnoremap <Leader><Leader><C-f> :Autoformat<CR><CR>:echo "The document has been formatted with :Autoformat"<CR>
|
||||||
|
nnoremap <silent><expr> <Leader><C-l> ':set tw=79<CR>gggqG:set tw=0<CR>:echo "Document text has been formatted to a width of 79 characters"<CR>'
|
||||||
|
vnoremap <silent><expr> <Leader><C-l> '<Esc>:set tw=79<CR>gvgq:set tw=0<CR>:echo "Selected text has been formatted to a width of 79 characters"<CR>'
|
||||||
nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
||||||
nnoremap <silent><expr> <Leader><C-t> ':retab<CR>:noh<CR>:echo "Tabs have been converted to spaces"<CR>'
|
nnoremap <silent><expr> <Leader><C-t> ':retab<CR>:noh<CR>:echo "Tabs have been converted to spaces"<CR>'
|
||||||
nnoremap <silent><expr> <Leader>/ ':noh<CR>:echo "Search results have been cleared"<CR>'
|
nnoremap <silent><expr> <Leader>/ ':noh<CR>:echo "Search results have been cleared"<CR>'
|
||||||
|
|
Loading…
Reference in a new issue