Created
April 26, 2012 02:08
-
-
Save violetyk/2495195 to your computer and use it in GitHub Desktop.
[vim]qfixhowm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"---------------------------------------------------- | |
" QFixHowm | |
" Bundle 'fuenor/qfixhowm' | |
"---------------------------------------------------- | |
let howm_dir = $HOME . '/howm' | |
let howm_fileencoding = 'utf-8' | |
let howm_fileformat = 'unix' | |
let QfixHown_UserSwActionLock = ['[]', '[cakephp]', '[vim]', '[linux]'] | |
nnoremap <silent> g,. :<C-u>call HatenaSuperPreHighlight()<CR> | |
"Hatena super pre highlight | |
function! HatenaSuperPreHighlight() | |
let ft = expand('%:e') | |
if ft == 'howm' | |
let ft = 'howm_memo' | |
endif | |
if &filetype != ft | |
exec 'setlocal filetype='.ft | |
return | |
endif | |
let sl = search('^>|.\+|$', 'ncbW') | |
if sl == 0 | |
let sl = search('^>|.\+|$', 'ncW') | |
endif | |
if sl != 0 | |
let ft = getline(sl) | |
let ft = substitute(ft, '[>|]', '', 'g') | |
exec 'setlocal filetype='.ft | |
return | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment