Ches Martin  committed 29dd31f

Markdown editing conveniences: ctags, vim previews

  • Participants
  • Parent commits 60a0899
  • Branches default

Comments (0)

Files changed (3)

 --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*var[ \t]+([a-zA-Z0-9_]+)/\3/l,variables/
 --regex-scala=/^[ \t]*package[ \t]+([a-zA-Z0-9_.]+)/\1/p,packages/ 
+--regex-markdown=/^#[ \t]+(.*)/\1/h,Heading1/
+--regex-markdown=/^##[ \t]+(.*)/\1/i,Heading2/
+--regex-markdown=/^###[ \t]+(.*)/\1/k,Heading3/

File .vim/include/bundles.vim

 Bundle 'godlygeek/tabular'
 Bundle 'godlygeek/csapprox'
 Bundle 'gregsexton/gitv'
-Bundle 'greyblake/vim-preview'
+" Bundle 'greyblake/vim-preview'  " Too many damned external dependencies
+Bundle 'ivanov/vim-ipython'
+Bundle 'jmcantrell/vim-virtualenv'
 Bundle 'kana/vim-textobj-user'
 Bundle 'kchmck/vim-coffee-script'
 Bundle 'klen/rope-vim'
 Bundle 'scrooloose/nerdtree'
 Bundle 'scrooloose/syntastic'
 Bundle 'sjl/gundo.vim'
+Bundle 'swaroopch/vim-markdown-preview'
 " switch from scrooloose fork for NERDDefaultAlign:
 Bundle 'ervandew/nerdcommenter'
 Bundle 'pangloss/vim-javascript'
 " Toggle a window's height stickiness, so C-w = doesn't equalize it
 nmap <leader>` :set invwinfixheight winfixheight?<CR>
+" QuickLook the current file. With Brett Terpstra's awesome CSS fork of
+" the MMD QuickLook plugin, this sure beats browser-based Markdown preview.
+if has('mac')
+  nnoremap <Leader>ql :write<CR>:sil !qlmanage -p % >& /dev/null &<CR>:redraw!<CR>
+  nnoremap <Leader>qlk :sil !killall qlmanage >& /dev/null<CR>
 " Lotsa TextMate-inspired Mappings
     autocmd FileType markdown nnoremap <buffer> <leader>1 yypVr=
     autocmd FileType markdown nnoremap <buffer> <leader>2 yypVr-
+    autocmd FileType markdown setlocal linebreak
     autocmd FileType vimwiki setlocal foldlevel=2 textwidth=78 linebreak
     autocmd FileType vimwiki map <buffer> <M-Space> <Plug>VimwikiToggleListItem