Played with keybindings to make them more consistent and logical and making

room to add more complete spellcheck support via the custom bindings (starting
with ?).
This commit is contained in:
Kevin MacMartin 2014-06-25 02:47:29 -04:00
parent 7e84ff8b9b
commit ca75532279
3 changed files with 132 additions and 90 deletions

View file

@ -83,33 +83,45 @@ A theme, config and collection of plugins for Vim.
### Keyboard ### ### Keyboard ###
#### Toggles and Sidebars #### #### Sidebars ####
| Binding | Mode | Action | | Binding | Mode | Action |
|:-----------------------|:----:|-------------------------------------------------:| |:-----------------------|:----:|-------------------------------------------------:|
| \<Backslash\>\<Space\> | NORM | Toggle the **goyo** distraction-free UI | | \<F1\> | ALL | Toggle **vimfiler** file manager sidebar |
| | | | | \<F2\> | ALL | Toggle the **gundo** undo history sidebar |
| ?? | NORM | Toggle the **vim** reference manual | | \<F3\> | ALL | Toggle the **tagbar** source code tag sidebar |
| ~ | NORM | Toggle **vimfiler** file manager sidebar |
| \` | NORM | Toggle the gutter (line #s, folds, git diffs) |
| | | |
| \<F1\> | ALL | Toggle the **gundo** undo history sidebar |
| \<F2\> | ALL | Toggle the **tagbar** source code tag sidebar |
| \<F3\> | ALL | Toggle the **spellcheck** bottom bar of mistakes |
| \<F4\> | ALL | Toggle the **extradite** git history window | | \<F4\> | ALL | Toggle the **extradite** git history window |
#### Toggles ####
| Binding | Mode | Action |
|:-----------------------|:----:|-------------------------------------------------:|
| \<(Ctrl-or-Alt)-F1\> | ALL | Toggle line wrapping |
| \<(Ctrl-or-Alt)-F2\> | ALL | Toggle highlighting of spelling mistakes |
| \<(Ctrl-or-Alt)-F3\> | ALL | Toggle source code syntax checking |
| \<(Ctrl-or-Alt)-F4\> | ALL | Toggle external-paste mode |
| | | | | | | |
| \<Ctrl-F1\> | ALL | Toggle line wrapping | | \` | NORM | Toggle gutter (left bar with line numbers etc.) |
| \<Ctrl-F2\> | ALL | Toggle highlighting of spelling mistakes | | \<Backslash\>\<F1\> | NORM | Toggle the **vim** reference manual |
| \<Ctrl-F3\> | ALL | Toggle source code syntax checking | | \<Backslash\>\<Space\> | NORM | Toggle the **goyo** distraction-free UI |
| \<Ctrl-F4\> | ALL | Toggle external-paste mode | | ?\<Space\> | NORM | Toggle the **spellcheck** bottom bar of mistakes |
#### Spell Check ####
| Binding | Mode | Action |
|:-----------------------|:----:|-------------------------------------------------:|
| ?<Space> | NORM | Toggle spellcheck error list |
| ?+ | NORM | Add the selected word to the local dictionary |
| ?? | NORM | Show spelling suggestions for selected word |
| ?N | NORM | Go to the next spelling mistake |
| ?P | NORM | Go to the previous spelling mistake |
##### GVim ##### ##### GVim #####
| Binding | Mode | Action | | Binding | Mode | Action |
|:-----------------------|:----:|-------------------------------------------------:| |:-----------------------|:----:|-------------------------------------------------:|
| \<Ctrl-F10\> | ALL | Toggle the menubar **(gvim)** | | \<F12\> | ALL | Toggle the menubar **(gvim)** |
| \<Ctrl-F11\> | ALL | Toggle the toolbar **(gvim)** | | \<Ctrl-F12\> | ALL | Toggle the toolbar **(gvim)** |
| \<Ctrl-F12\> | ALL | Toggle the scrollbars **(gvim)** |
### Complete Reference ### ### Complete Reference ###

View file

@ -73,8 +73,7 @@
" <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 and features) " (toggles and features)
" ?? | (N) -> toggle the vim reference manual " <Leader><F1> | (N) -> toggle the vim reference manual
" ~ | (N) -> toggle vimfiler sidebar
" ` | (A) -> toggle the gutter(line numbers, folds and signify) " ` | (A) -> toggle the gutter(line numbers, folds and signify)
" "
" Space | (N) -> toggle selected fold " Space | (N) -> toggle selected fold
@ -82,41 +81,50 @@
" <Leader>- | (N) -> unopen all folds " <Leader>- | (N) -> unopen all folds
" <Leader>0 | (N) -> reset all folds using default fold level " <Leader>0 | (N) -> reset all folds using default fold level
" "
" <F1> | (N) -> toggle the gundo sidebar " <F1> | (A) -> toggle vimfiler sidebar
" <F2> | (A) -> toggle the tagbar sidebar " <F2> | (A) -> toggle the gundo sidebar
" <F3> | (A) -> toggle spellcheck error list " <F3> | (A) -> toggle the tagbar sidebar
" <F4> | (A) -> toggle extradite git commit history " <F4> | (A) -> toggle extradite git commit history
" "
" <Ctrl-F1> | (A) -> toggle line wrapping " <Ctrl-F1> | (A) -> toggle line wrapping
" <Ctrl-F2> | (A) -> toggle spell check " <Ctrl-F2> | (A) -> toggle spell check
" <Ctrl-F3> | (A) -> toggle syntax checking " <Ctrl-F3> | (A) -> toggle syntax checking
" <Ctrl-F4> | (A) -> toggle external-paste mode " <Ctrl-F4> | (A) -> toggle external-paste mode
" <Alt-F1> | (A) -> toggle line wrapping
" <Alt-F2> | (A) -> toggle spell check
" <Alt-F3> | (A) -> toggle syntax checking
" <Alt-F4> | (A) -> toggle external-paste mode
" "
" (gvim toggles) " (gvim toggles)
" <Ctrl-F10> | (A) -> toggle the menubar " <F12> | (A) -> toggle the menubar
" <Ctrl-F11> | (A) -> toggle the toolbar " <Ctrl-F12> | (A) -> toggle the toolbar
" <Ctrl-F12> | (A) -> toggle the scrollbar "
" (spellcheck)
" ?<Space> | (N) -> toggle spellcheck error list
" ?+ | (N) -> add the selected word to the local dictionary
" ?? | (N) -> show spelling suggestions for selected word
" ?N | (N) -> go to the next spelling mistake
" ?P | (N) -> go to the previous spelling mistake
" "
" (completion) " (completion)
" <Ctrl-m>, | (A) -> enter after emmet 'word' (ie: html:5) " <Ctrl-m>, | (A) -> enter after emmet 'word' (ie: html:5)
" \\ | (N) -> show spelling suggestions popup for word
" \| | (N) -> add word to a local list of correct spellings
" <Tab> | (I) -> (neocomp) autocomplete using common string " <Tab> | (I) -> (neocomp) autocomplete using common string
" <Leader><Tab> | (I) -> (neocomp) autocomplete the common string " <Leader><Tab> | (I) -> (neocomp) autocomplete the common string
" <Enter> | (I) -> (neocomp) close the suggestion popup " <Enter> | (I) -> (neocomp) close the suggestion popup
" <Leader><Backspace> | (I) -> (neocomp) undo the most recent completion " <Leader><Backspace> | (I) -> (neocomp) undo the most recent completion
" "
" (search)
" <Leader>\ | (N) -> remove search highlighting
"
" (formatting) " (formatting)
" <Backspace> | (V) -> deletes currently selected text " <Backspace> | (V) -> deletes currently selected text
" <Leader><Ctrl-f> | (N) -> format document and return to cursor " <Leader>J | (N) -> format document text to 79 chars
" <Leader><Ctrl-f> | (V) -> format the selection and return to cursor " <Leader>J | (V) -> format selected text to 79 chars
" <Leader><Leader><Ctrl-f> | (N) -> format document using :Autoformat " <Leader>f | (N) -> format document and return to cursor
" <Leader><Ctrl-l> | (N) -> format document to a width of 79 characters " <Leader>f | (V) -> format the selection and return to cursor
" <Leader><Ctrl-l> | (V) -> format selection to a width of 79 characters " <Leader>F | (N) -> format document using :Autoformat
" <Leader><Ctrl-w> | (N) -> remove whitespace " <Leader>w | (N) -> remove whitespace
" <Leader><Ctrl-t> | (N) -> convert tabs into spaces " <Leader>t | (N) -> convert tabs into spaces
" <Leader>\ | (N) -> 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
" <Tab> | (N) -> indent the current line " <Tab> | (N) -> indent the current line
" <Shift-Tab> | (V) -> unindent all the lines currently selected " <Shift-Tab> | (V) -> unindent all the lines currently selected
@ -224,7 +232,7 @@
" "
" (help) " (help)
" q | (A) -> close the dialog " q | (A) -> close the dialog
" ?? | (A) -> close the dialog " <Leader><F1> | (A) -> close the dialog
" ?> | (A) -> close the dialog " ?> | (A) -> close the dialog
" ?< | (A) -> close the dialog " ?< | (A) -> close the dialog
" "
@ -266,8 +274,9 @@
noremap < <Nop> noremap < <Nop>
"-unmapping help from F1 and Ctrl-F1 for use toggling the reference manual "-unmapping help from F1 and Ctrl-F1 for use toggling the reference manual
"+the :h topic feature works, and ?? displays quickref "+the :h topic feature works, and <Leader><F1> displays quickref
map <F1> <Nop> map <F1> <Nop>
map <A-F1> <Nop>
map <C-F1> <Nop> map <C-F1> <Nop>
"}}} "}}}
@ -362,10 +371,7 @@
"TOGGLES AND FEATURES:{ "TOGGLES AND FEATURES:{
"toggle the vim reference manual "toggle the vim reference manual
nnoremap <silent><expr> ?? ':h index.txt<CR>' nnoremap <silent><expr> <Leader><F1> ':h index.txt<CR>'
"trigger vimfiler
nnoremap <silent><expr> ~ ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
"toggle the display of the left gutter "toggle the display of the left gutter
nnoremap <silent><expr> ` ':if (&number)<Bar>set number!<Bar>if (&foldenable)<Bar>set foldenable!<Bar>endif<Bar>if exists("b:sy")<Bar>if (b:sy.active)<Bar>SignifyToggle<Bar>endif<Bar>endif<Bar>else<Bar>set number!<Bar>if !(&foldenable)<Bar>set foldenable!<Bar>endif<Bar>if exists("b:sy")<Bar>if !(b:sy.active)<Bar>SignifyToggle<Bar>endif<Bar>endif<Bar>endif<CR>:echo "gutter visibility toggled"<CR>' nnoremap <silent><expr> ` ':if (&number)<Bar>set number!<Bar>if (&foldenable)<Bar>set foldenable!<Bar>endif<Bar>if exists("b:sy")<Bar>if (b:sy.active)<Bar>SignifyToggle<Bar>endif<Bar>endif<Bar>else<Bar>set number!<Bar>if !(&foldenable)<Bar>set foldenable!<Bar>endif<Bar>if exists("b:sy")<Bar>if !(b:sy.active)<Bar>SignifyToggle<Bar>endif<Bar>endif<Bar>endif<CR>:echo "gutter visibility toggled"<CR>'
@ -388,20 +394,20 @@
xnoremap <silent><expr> <Leader>0 '<Esc>zXgv' xnoremap <silent><expr> <Leader>0 '<Esc>zXgv'
inoremap <silent><expr> <Leader>0 '<C-O>zX' inoremap <silent><expr> <Leader>0 '<C-O>zX'
"trigger vimfiler
nnoremap <silent><expr> <F1> ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
xnoremap <silent><expr> <F1> '<Esc>:VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
inoremap <silent><expr> <F1> '<Esc>:VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
"bindings to trigger the gundo undo history "bindings to trigger the gundo undo history
nnoremap <silent><expr> <F1> ':GundoToggle<CR>:echo "undo history sidebar toggled"<CR>' nnoremap <silent><expr> <F2> ':GundoToggle<CR>:echo "undo history sidebar toggled"<CR>'
xnoremap <silent><expr> <F1> '<Esc>:GundoToggle<CR>' xnoremap <silent><expr> <F2> '<Esc>:GundoToggle<CR>'
inoremap <silent><expr> <F1> '<Esc>:GundoToggle<CR>' inoremap <silent><expr> <F2> '<Esc>:GundoToggle<CR>'
"bindings to trigger the tagbar list of tags "bindings to trigger the tagbar list of tags
nnoremap <silent><expr> <F2> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>' nnoremap <silent><expr> <F3> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
xnoremap <silent><expr> <F2> '<Esc>:TagbarToggle<CR>gv' xnoremap <silent><expr> <F3> '<Esc>:TagbarToggle<CR>gv'
inoremap <silent><expr> <F2> '<C-O>:TagbarToggle<CR>' inoremap <silent><expr> <F3> '<C-O>:TagbarToggle<CR>'
"bindings to trigger spellcheck
nnoremap <silent><expr> <F3> ':UpdateAndSpellCheck<CR>:call ToggleQuickfixList()<CR>:wincmd j<CR>'
xnoremap <silent><expr> <F3> '<Esc>:UpdateAndSpellCheck<CR>:call ToggleQuickfixList()<CR>:wincmd j<CR>'
inoremap <silent><expr> <F3> '<Esc>:UpdateAndSpellCheck<CR>:call ToggleQuickfixList()<CR>:wincmd j<CR>'
"view commit history and diffs "view commit history and diffs
nnoremap <expr><silent> <F4> ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' nnoremap <expr><silent> <F4> ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
@ -412,43 +418,64 @@
nnoremap <silent><expr> <C-F1> ':set wrap!<CR>:echo "line wrapping toggled"<CR>' nnoremap <silent><expr> <C-F1> ':set wrap!<CR>:echo "line wrapping toggled"<CR>'
xnoremap <silent><expr> <C-F1> '<Esc>:set wrap!<CR>gv' xnoremap <silent><expr> <C-F1> '<Esc>:set wrap!<CR>gv'
inoremap <silent><expr> <C-F1> '<C-O>:set wrap!<CR>' inoremap <silent><expr> <C-F1> '<C-O>:set wrap!<CR>'
nnoremap <silent><expr> <A-F1> ':set wrap!<CR>:echo "line wrapping toggled"<CR>'
"toggle syntax checking xnoremap <silent><expr> <A-F1> '<Esc>:set wrap!<CR>gv'
nnoremap <silent><expr> <C-F2> ':SyntasticToggleMode<CR>' inoremap <silent><expr> <A-F1> '<C-O>:set wrap!<CR>'
xnoremap <silent><expr> <C-F2> '<Esc>:SyntasticToggleMode<CR>gv'
inoremap <silent><expr> <C-F2> '<C-O>:SyntasticToggleMode<CR>'
"toggle spellcheck "toggle spellcheck
nnoremap <silent><expr> <C-F3> ':set spell!<CR>:echo "spell checking toggled"<CR>' nnoremap <silent><expr> <C-F2> ':set spell!<CR>:echo "spell checking toggled"<CR>'
xnoremap <silent><expr> <C-F3> '<Esc>:set spell!<CR>gv' xnoremap <silent><expr> <C-F2> '<Esc>:set spell!<CR>gv'
inoremap <silent><expr> <C-F3> '<C-O>:set spell!<CR>' inoremap <silent><expr> <C-F2> '<C-O>:set spell!<CR>'
nnoremap <silent><expr> <A-F2> ':set spell!<CR>:echo "spell checking toggled"<CR>'
xnoremap <silent><expr> <A-F2> '<Esc>:set spell!<CR>gv'
inoremap <silent><expr> <A-F2> '<C-O>:set spell!<CR>'
"toggle syntax checking
nnoremap <silent><expr> <C-F3> ':SyntasticToggleMode<CR>'
xnoremap <silent><expr> <C-F3> '<Esc>:SyntasticToggleMode<CR>gv'
inoremap <silent><expr> <C-F3> '<C-O>:SyntasticToggleMode<CR>'
nnoremap <silent><expr> <A-F3> ':SyntasticToggleMode<CR>'
xnoremap <silent><expr> <A-F3> '<Esc>:SyntasticToggleMode<CR>gv'
inoremap <silent><expr> <A-F3> '<C-O>:SyntasticToggleMode<CR>'
"toggle external-paste mode "toggle external-paste mode
set pastetoggle=<C-F4> set pastetoggle=<C-F4>
noremap <A-F4> <C-F4>
"} "}
"GVIM TOGGLES:{ "GVIM TOGGLES:{
"map toggles for the menu, toolbar and vertical scrollbar "toggle the menu
nnoremap <silent><expr> <C-F10> ":if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>:echo 'Menu bar toggled'<CR>" nnoremap <silent><expr> <F12> ":if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>:echo 'Menu bar toggled'<CR>"
vnoremap <silent><expr> <C-F10> "<Esc>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>gv" vnoremap <silent><expr> <F12> "<Esc>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>gv"
inoremap <silent><expr> <C-F10> "<C-O>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>" inoremap <silent><expr> <F12> "<C-O>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>"
nnoremap <silent><expr> <C-F11> ":if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>:echo 'Toolbar toggled'<CR>" "toggle the toolbar
vnoremap <silent><expr> <C-F11> "<Esc>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>gv" nnoremap <silent><expr> <C-F12> ":if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>:echo 'Toolbar toggled'<CR>"
inoremap <silent><expr> <C-F11> "<C-O>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>" vnoremap <silent><expr> <C-F12> "<Esc>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>gv"
inoremap <silent><expr> <C-F12> "<C-O>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>"
"}
nnoremap <silent><expr> <C-F12> ":if &go=~#'r'<Bar>set go-=r<Bar>set go-=L<Bar>set go-=b<Bar>else<Bar>set go+=r<Bar>set go+=L<Bar>set go+=b<Bar>endif<CR>:echo 'Scrollbars toggled'<CR>" "SPELLCHECK:{
vnoremap <silent><expr> <C-F12> "<Esc>:if &go=~#'r'<Bar>set go-=r<Bar>set go-=L<Bar>set go-=b<Bar>else<Bar>set go+=r<Bar>set go+=L<Bar>set go+=b<Bar>endif<CR>gv" "trigger spellcheck bar
inoremap <silent><expr> <C-F12> "<C-O>:if &go=~#'r'<Bar>set go-=r<Bar>set go-=L<Bar>set go-=b<Bar>else<Bar>set go+=r<Bar>set go+=L<Bar>set go+=b<Bar>endif<CR>" nnoremap <silent><expr> ?<Space> ':UpdateAndSpellCheck<CR>:call ToggleQuickfixList()<CR>:wincmd j<CR>'
"add the selected mispelled word to the local dictionary
nnoremap ?+ zg
"display a list of suggestions for the selected mispelled word
nnoremap ?? hei<C-X><C-S>
"go to the next mispelled word
nnoremap ?N ]s
"go to the previous mispelled word
nnoremap ?P [s
"} "}
"COMPLETION:{ "COMPLETION:{
"emmet switch triggerkey from <Ctrl-Y> "emmet switch triggerkey from <Ctrl-Y>
let g:user_emmet_leader_key='<C-m>' let g:user_emmet_leader_key='<C-m>'
"press backslash twice on a mispelled word for suggestions
nnoremap \\ hei<C-X><C-S>
nnoremap \| zg
"neocomplcache: scroll through completion list "neocomplcache: scroll through completion list
inoremap <expr><Tab> pumvisible() ? "\<C-n>" : "\<Tab>" inoremap <expr><Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
@ -460,20 +487,22 @@
inoremap <expr><Leader><Backspace> "<Backspace>" . neocomplcache#undo_completion() inoremap <expr><Leader><Backspace> "<Backspace>" . neocomplcache#undo_completion()
"} "}
"FORMATTING:{
nnoremap <silent><expr> <Leader>/ ':noh<CR>:echo "Search results have been cleared"<CR>'
"}
"FORMATTING:{ "FORMATTING:{
"have backspace delete the selected text "have backspace delete the selected text
vnoremap <Backspace> "_x vnoremap <Backspace> "_x
"formatting options to apply to the whole document "formatting options to apply to the whole document
nnoremap <Leader><C-f> mzgg=G`z<CR>:echo "The document has been formatted"<CR> nnoremap <silent><expr> <Leader>J ':set tw=79<CR>gggqG:set tw=0<CR>:echo "Document text has been formatted to a width of 79 characters"<CR>'
vnoremap <Leader><C-f> mz=`z<CR>:echo "The selection has been formatted"<CR> vnoremap <silent><expr> <Leader>J '<Esc>:set tw=79<CR>gvgq:set tw=0<CR>:echo "Selected text has been formatted to a width of 79 characters"<CR>'
nnoremap <Leader><Leader><C-f> :Autoformat<CR><CR>:echo "The document has been formatted with :Autoformat"<CR> nnoremap <Leader>f mzgg=G`z<CR>:echo "The document has been formatted"<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 <Leader>f mz=`z<CR>:echo "The selection has been formatted"<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 <Leader>F :Autoformat<CR><CR>:echo "The document has been formatted with :Autoformat"<CR>
nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>' nnoremap <silent><expr> <Leader>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>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><Esc> ':noh<CR>:echo "Search results have been cleared"<CR>'
"tab and untab the currently selected lines "tab and untab the currently selected lines
vnoremap <Tab> >gv vnoremap <Tab> >gv
@ -607,11 +636,11 @@
"help "help
if !&diff if !&diff
autocmd FileType help map <buffer> <silent><expr> q ':q<CR>' autocmd FileType help map <buffer> <silent><expr> q ':q<CR>'
autocmd FileType help map <buffer> <silent><expr> ?? ':q<CR>' autocmd FileType help map <buffer> <silent><expr> <Leader><F1> ':q<CR>'
endif endif
"markdown: launch table of contents instead of the tagbar "markdown: launch table of contents instead of the tagbar
autocmd FileType mkd map <buffer> <silent><expr> <F2> ':Toch<CR>' autocmd FileType mkd map <buffer> <silent><expr> <F3> ':Toch<CR>'
"markdown table of contents "markdown table of contents
autocmd FileType qf map <buffer> <LeftMouse> <LeftMouse>0 autocmd FileType qf map <buffer> <LeftMouse> <LeftMouse>0
@ -624,7 +653,7 @@
autocmd FileType qf map <buffer> h j autocmd FileType qf map <buffer> h j
autocmd FileType qf map <buffer> l k autocmd FileType qf map <buffer> l k
autocmd FileType qf map <buffer> <silent><expr> q ':hide<CR>' autocmd FileType qf map <buffer> <silent><expr> q ':hide<CR>'
autocmd FileType qf map <buffer> <silent><expr> <F3> ':hide<CR>' autocmd FileType qf map <buffer> <silent><expr> ?<Space> ':hide<CR>'
"vimdiff "vimdiff
autocmd FilterWritePre * if &diff|nnoremap <buffer> <silent><expr> <Leader><> ':diffu<CR>'|endif autocmd FilterWritePre * if &diff|nnoremap <buffer> <silent><expr> <Leader><> ':diffu<CR>'|endif
@ -646,9 +675,9 @@
"DISABLED MAPPINGS FOR FILETYPES: {{{ "DISABLED MAPPINGS FOR FILETYPES: {{{
"remove incompatible toggles from specific file types "remove incompatible toggles from specific file types
autocmd Filetype qf,vimfiler,extradite,help noremap <buffer> <F1> <Nop> autocmd Filetype qf,vimfiler,extradite,help noremap <buffer> <F2> <Nop>
autocmd Filetype qf,ggundo,vimfiler,extradite,help noremap <buffer> <F2> <Nop> autocmd Filetype qf,ggundo,vimfiler,extradite,help noremap <buffer> <F3> <Nop>
autocmd Filetype ggundo,vimfiler,extradite,tagbar,help noremap <buffer> <F3> <Nop> autocmd Filetype ggundo,vimfiler,extradite,tagbar,help noremap <buffer> ?<Space> <Nop>
autocmd Filetype qf,ggundo,vimfiler,tagbar,help noremap <buffer> <12> <Nop> autocmd Filetype qf,ggundo,vimfiler,tagbar,help noremap <buffer> <12> <Nop>
"disable modifier keys with directions that would interfere with logic "disable modifier keys with directions that would interfere with logic

View file

@ -77,5 +77,6 @@
"GVIM: GUI CONFIG OPTIONS {{{ "GVIM: GUI CONFIG OPTIONS {{{
set guicursor+=a:blinkon0 "disable the blinking cursor set guicursor+=a:blinkon0 "disable the blinking cursor
set guioptions=aegi set guioptions=aegip "enable some good defaults for gvim
set guioptions+=lRb "enable scrollbars (right only when a split is present)
"}}} "}}}