Ches Martin avatar Ches Martin committed 29dd31f

Markdown editing conveniences: ctags, vim previews

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/ 
 
+--langdef=markdown
+--langmap=markdown:.mkd.md.markdown
+--regex-markdown=/^#[ \t]+(.*)/\1/h,Heading1/
+--regex-markdown=/^##[ \t]+(.*)/\1/i,Heading2/
+--regex-markdown=/^###[ \t]+(.*)/\1/k,Heading3/
+

.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>
+endif
 "}}}
 
 " 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.