I'm annoyed by the default python syntax highlighting in Vim.
It does not select the operator else:correctly. Vim only emphasizes the else statement if I have a space between elseand the colon :, so it else :works, but it else:doesn't work.
else:
else
:
else :
This should be an easy fix.
I am using Vim 7.2
In my vimrc file, I had an expression. It did differently: to be designated as one word. After removing this one more: syntax highlighting works fine.
set iskeyword+=:
It should work by default.
, :
/usr/share/vim/vim72/syntax/python.vim
syn keyword pythonConditional if elif else
, . elif?
elif
,
- .
http://www.vim.org/scripts/script.php?script_id=790
, vimrc:
" No seriously, else: is the same as else autocmd BufEnter,BufRead,BufNewFile *.py set iskeyword-=:
, . python vim : http://www.pixelbeat.org/settings/.vimrc
~/.vim/syntax/python.vim
syn keyword pythonConditional else:
.