level 1
因为用vim些python,所以对齐很重要。
不知道有没有方法可以在光标所在位置屏幕上显示一条竖线,
竖线可以跟随光标左右移动。
就像一行的下划线那样
2013年11月12日 12点11分
1
level 12
简单粗暴的做法:
au! CursorMoved * let &cc=col('.')
au! CursorMovedI * let &cc=col('.')
不过觉得这样很傻
应该有更好的方法
2013年11月12日 13点11分
2
![[真棒]](/static/emoticons/u771fu68d2.png)
很好,可以用的,多谢
2013年11月12日 13点11分
level 11
" 给当前列打标记。
map <leader>cl :call SetColorColumn()<CR>
function! SetColorColumn()
let col_num = virtcol(".")
let cc_list = split(&cc, ',')
if count(cc_list, string(col_num)) <= 0
execute "set cc+=".col_num
else
execute "set cc-=".col_num
endif
endfunction
2014年05月02日 03点05分
7