From 954632c7b7c2d4a15afa9464bcf37d497626da38 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 22 Jul 2014 22:56:22 -0400 Subject: [PATCH] Added tcommand to provide a searchable list of commands via ` --- .gitmodules | 6 ++++++ README.md | 4 +++- vim/bundle/tcommand_vim | 1 + vim/bundle/tlib_vim | 1 + vim/config/keyboard.vim | 22 ++++++++++++---------- vim/config/plugins.vim | 4 ++++ 6 files changed, 27 insertions(+), 11 deletions(-) create mode 160000 vim/bundle/tcommand_vim create mode 160000 vim/bundle/tlib_vim diff --git a/.gitmodules b/.gitmodules index 26102a3..1c76900 100644 --- a/.gitmodules +++ b/.gitmodules @@ -91,3 +91,9 @@ [submodule "vim/bundle/goyo.vim"] path = vim/bundle/goyo.vim url = https://github.com/prurigro/goyo.vim.git +[submodule "vim/bundle/tcommand_vim"] + path = vim/bundle/tcommand_vim + url = https://github.com/tomtom/tcommand_vim.git +[submodule "vim/bundle/tlib_vim"] + path = vim/bundle/tlib_vim + url = git://github.com/tomtom/tlib_vim.git diff --git a/README.md b/README.md index 233ad93..7480ba7 100644 --- a/README.md +++ b/README.md @@ -98,12 +98,14 @@ A theme, config and collection of plugins for Vim. | Binding | Mode | Action | |:-----------------------|:----:|-------------------------------------------------:| +| \` | NORM | Popup a command list dialog | +| | | | | \ | ALL | Toggle line wrapping | | \ | ALL | Toggle highlighting of spelling mistakes | | \ | ALL | Toggle source code syntax checking | | \ | ALL | Toggle external-paste mode | | | | | -| \` | NORM | Toggle gutter (left bar with line numbers etc.) | +| ~ | NORM | Toggle gutter (left bar with line numbers etc.) | | \\ | NORM | Toggle the **vim** reference manual | | \\ | NORM | Toggle the **goyo** distraction-free UI | | ?\ | NORM | Toggle the **spellcheck** bottom bar of mistakes | diff --git a/vim/bundle/tcommand_vim b/vim/bundle/tcommand_vim new file mode 160000 index 0000000..e5444b4 --- /dev/null +++ b/vim/bundle/tcommand_vim @@ -0,0 +1 @@ +Subproject commit e5444b47ea15b477e962ac5744a0c0b1827571ef diff --git a/vim/bundle/tlib_vim b/vim/bundle/tlib_vim new file mode 160000 index 0000000..b82f880 --- /dev/null +++ b/vim/bundle/tlib_vim @@ -0,0 +1 @@ +Subproject commit b82f8804c4987b2534a5411d492d15d6010e98d2 diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 852527f..75ad1c9 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -73,9 +73,10 @@ " | (N) -> create a new tab with a double pane vimfiler " " (toggles and features) +" ` | (N) -> popup a command reference " | (N) -> toggle the vim reference manual " ? | (N) -> toggle the vim reference manual -" ` | (A) -> toggle the gutter(line numbers, folds and signify) +" ~ | (A) -> toggle the gutter(line numbers, folds and signify) " " | (N) -> toggle selected fold " | (N) -> open all folds @@ -121,9 +122,6 @@ " | (I) -> (neocomp) close the popup and " | (I) -> (neocomp) undo the most recent completion " -" (search) -" / | (N) -> remove search highlighting -" " (formatting) " | (V) -> deletes currently selected text " J | (N) -> split the line into lines of <=79 chars @@ -183,6 +181,8 @@ " | (V) -> select one word right " | (V) -> select one word left " +" / | (N) -> remove search highlighting +" " (copy/paste and undo/redo) " p | (N) -> view the paste buffers and register contents " y | (N) -> copies the character at the cursor @@ -380,12 +380,15 @@ "} "TOGGLES AND FEATURES:{ + "toggle the command reference box + nnoremap ` ':TCommand' + "toggle the vim reference manual nnoremap ':h index.txt' nnoremap ? ':h index.txt' "toggle the display of the left gutter - nnoremap ` ':if (&number)set nonumberif (&foldenable)set nofoldenableendifif exists("b:sy")if (b:sy.active)SignifyToggleendifendifelseset numberif !(&foldenable)set foldenableendifif exists("b:sy")if !(b:sy.active)SignifyToggleendifendifendif:echo "gutter visibility toggled"' + nnoremap ~ ':if (&number)set nonumberif (&foldenable)set nofoldenableendifif exists("b:sy")if (b:sy.active)SignifyToggleendifendifelseset numberif !(&foldenable)set foldenableendifif exists("b:sy")if !(b:sy.active)SignifyToggleendifendifendif:echo "gutter visibility toggled"' "toggle folded code at foldpoints nnoremap za @@ -504,10 +507,6 @@ inoremap neocomplcache#undo_completion() "} - "FORMATTING:{ - nnoremap / ':noh:echo "Search results have been cleared"' - "} - "FORMATTING:{ "have backspace delete the selected text vnoremap "_x @@ -587,6 +586,9 @@ xnoremap G$ xnoremap $ xnoremap ^ + + "clear search results + nnoremap / ':noh:echo "Search results have been cleared"' "} "COPY PASTE AND UNDO REDO:{ @@ -692,7 +694,7 @@ "DISABLED MAPPINGS FOR FILETYPES: {{{ "remove incompatible toggles from specific file types - autocmd Filetype qf,gundo,vimfiler,tagbar,extradite,help noremap ` + autocmd Filetype qf,gundo,vimfiler,tagbar,extradite,help noremap ~ autocmd Filetype qf,vimfiler,extradite,help noremap autocmd Filetype qf,vimfiler,extradite,help noremap autocmd Filetype qf,gundo,vimfiler,extradite,help noremap diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index f36c38f..c24ec1d 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -176,6 +176,10 @@ let g:tagbar_width=35 "}}} +"TCOMMAND: {{{ + let g:tcommand#include_history=0 +"}}} + "VIM FILER: {{{ "autostart filer when vim opens to an empty buffer (default: 1) if !exists("g:autostartfiler")|let g:autostartfiler=1|endif