From 1d19dacfa9a9df1a5064c430d879f1fc32f431ab Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 8 Apr 2014 00:13:03 -0400 Subject: [PATCH] when editing markdown, the ctags button now pops up a heading browser instead --- vim/config/keyboard.vim | 90 +++++++++++++++++++++++++++-------------- vim/config/settings.vim | 16 ++++---- 2 files changed, 67 insertions(+), 39 deletions(-) diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 9870d3c..c5c8c58 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -40,7 +40,7 @@ " | (A) -> scroll left a few characters at a time " | (A) -> scroll right one character at a time " | (A) -> scroll left one character at a time -" | (A) -> unbind this from vim so xorg can paste +" | (A) -> unbind this from vim so xorg can paste " " (tabs) " 9 | (A) -> go to the next open tab @@ -170,20 +170,35 @@ " (help) " q | (N) -> close the dialog " +" (markdown) +" | (A) -> show heading TOC instead of the taglist +" +" (markdown toc) +" q | (A) -> close the toc +" | (A) -> close the toc +" | (A) -> select heading but remain in toc +" | (A) -> select heading to edit +" | (A) -> up +" | (A) -> down +" h | (A) -> j +" l | (A) -> k +" " (vimfiler) -" | (N) -> edit selected file -" | (N) -> same as normal + justify on the left -" | (N) -> same as the left mouse -" | (N) -> same as the left mouse +" | (N) -> edit selected file " | (N) -> map to l, which opens a directory " | (N) -> map to h, which goes up one directory " ' | (N) -> edit the selected file " n | (N) -> start editing a new file " +" (markdown toc + vimfiler) +" | (N) -> left click + left justify the cursor +" | (N) -> same as the left click +" | (N) -> same as the left click +" " (gundo) -" | (N) -> same as normal + justify on the left -" | (N) -> same as the left mouse -" | (N) -> same as the left mouse +" | (N) -> same as normal + justify on the left +" | (N) -> same as the left mouse +" | (N) -> same as the left mouse " | (N) -> same as down " l | (N) -> same as j " | (N) -> same as Up @@ -461,16 +476,31 @@ autocmd FileType help nnoremap ?> ':q' autocmd FileType help nnoremap ?< ':q' + "markdown launch table of contents instead of the tagbar + autocmd FileType mkd noremap ':TocL' + + "markdown table of contents + autocmd FileType qf noremap q ':q' + autocmd FileType qf noremap ':q' + autocmd FileType qf noremap p + autocmd FileType qf noremap <2-LeftMouse> + autocmd FileType qf noremap + autocmd FileType qf noremap + autocmd FileType qf noremap h j + autocmd FileType qf noremap l k + "vimfiler autocmd FileType vimfiler nmap <2-LeftMouse> (vimfiler_edit_file) - autocmd FileType vimfiler nmap 0 - autocmd FileType vimfiler nmap - autocmd FileType vimfiler nmap autocmd FileType vimfiler nmap l autocmd FileType vimfiler nmap h autocmd FileType vimfiler nmap ' e autocmd FileType vimfiler nmap n q + "markdown toc and vimfiler + autocmd FileType qf,vimfiler nmap 0 + autocmd FileType qf,vimfiler nmap + autocmd FileType qf,vimfiler nmap + "gundo autocmd FileType gundo nmap 0l autocmd FileType gundo nmap @@ -492,25 +522,25 @@ "DISABLED MAPPINGS: {{{ "remove incompatible toggles from specific filetypes - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler,help noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap - autocmd Filetype gundo,vimfiler noremap + autocmd Filetype qf,gundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler,help noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler noremap "}}} "ALIASES: COMMAND SHORTCUTS {{{ diff --git a/vim/config/settings.vim b/vim/config/settings.vim index 0e50686..8898931 100644 --- a/vim/config/settings.vim +++ b/vim/config/settings.vim @@ -46,6 +46,9 @@ set smarttab expandtab autoindent tabstop=4 shiftwidth=4 "configure tabs set laststatus=2 showcmd statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v] "statusline init and config set hlsearch incsearch ignorecase smartcase "configure search + set diffopt=foldcolumn:0,filler "vimdiff default settings + set formatoptions=roqnl12 "how automatic formatting is to be done + set foldmethod=syntax foldcolumn=1 foldlevel=3 "fold layers 3 or more deep let &showbreak="+ " "when linewrap is enabled, show wrapped lines with +++ "load the system version of matchit if another hasn't already been @@ -74,14 +77,12 @@ autocmd FileType gitcommit,notes,mail,notmuch,text setlocal spell autocmd FileType notes,mail,notmuch,mkd,text setlocal nonumber autocmd FileType mail,notmuch,text setlocal wrap - - "help specific settings autocmd FileType help* wincmd L "help windows always open vertically - autocmd FileType help* vertical res 80 - autocmd FileType help* setlocal nowrap nocursorline nocursorcolumn "help windows don't wrap + autocmd FileType help* vertical resize 80 "set the window size to 80 cols + autocmd FileType help* setlocal nocursorline "remove the horizontal cursor line + autocmd BufEnter,FileType qf,help* setlocal nowrap nocursorcolumn "disable text wrapping and the vertical cursor line - "set vimdiff settings - setlocal diffopt=foldcolumn:0,filler + "settings for buffers in diff mode autocmd VimEnter,FilterWritePre * if &diff|setlocal nofoldenable|endif autocmd VimEnter * if &diff|wincmd H|endif @@ -92,9 +93,6 @@ \ setlocal omnifunc=syntaxcomplete#Complete | \ endif endif - - set formatoptions=roqnl12 - set foldmethod=syntax foldcolumn=1 foldlevel=3 "fold layers 3 or more deep "}}} "GVIM: GUI CONFIG OPTIONS {{{