1. The help for 'stl' states that the statusline will be evaluated with·
each window (and buffer) set to the current window (and buffer). So, is·
it a bug in the following that the local settings of the current window·
are mirrored in all statusline entries? (Version info below¹)
" This isn't what I'm actually doing in my function
" It's just a reduced test case
fun! StatusLine()
let indent = '('.repeat('·', &l:sw).')'
let cole = &l:cole ? ' ['.&l:cole.']' : ''
return indent . cole
endf
let &stl = '%!StatusLine()'
2. Is there a way to access the 'actual_curbuf' variable from within a·
function called as part of 'stl'?
E.g.:
se stl=%!StatusLine()
fun! StatusLine()
" access actual_curbuf from here?
endf
3. Trying a non-function approach, should the following work (change the·
highlighting for non-current statuslines)?
let &stl = '%<%f%{bufnr("")==actual_curbuf?"":"%#Error#"}blahblahblah'
--·
Best,
Ben
¹: Version:
VIM - Vi IMproved 7.3 (2010 Aug 15)
Included patches: 1-202, 204-222, 224-322
Compiled by 'http://www.opensuse.org/'
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv
+cscope +cursorbind +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding
-footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession
+modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg
+path_extra +perl +persistent_undo +postscript +printer +profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent +sniff +startuptime
+statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit
+virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11 +xfontset -xim +xsmp_interact +xterm_clipboard -xterm_save
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/etc"
f-b for $VIMRUNTIME: "/usr/share/vim/current"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/usr/local/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unw
ind-tables -g -Wall -pipe -fno-strict-aliasing -fstack-protector-all -I/usr/include -D_LARGEFILE64_SOURCE=1
Linking: gcc -L. -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.14.2/x86_64-linux-thread-multi/CORE -L/usr/local/lib -Wl,--as-needed -o vim -lSM -
lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -lnsl -lncurses -lacl -lattr -lgpm -ldl -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.14.2/x86_64-linux-thread-multi/CORE -L/usr/loca
l/lib64 -fstack-protector -L/usr/lib/perl5/5.14.2/x86_64-linux-thread-multi/CORE -lperl -lm -ldl -lcrypt -lpthread -L/usr/lib64/python2.7/config -lpython2.7 -lpthread -ldl
-lutil -lm -Xlinker -export-dynamic -L/usr/lib64 -ltcl8.5 -ldl -lieee -lm -Wl,-R -Wl,/usr/lib64 -L/usr/lib64 -lruby -lrt -ldl -lcrypt -lm -L/usr/lib64
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment