Re: How to set USERNAME in RHS of set command
On Jun 26, 10:38 pm, John Little john.b.lit...@gmail.com wrote: I have an expression in my status line option %1*%{ff=~'u'?'':ff}%* I have wondered about coloring the statusline. Thank you John. These work the way I would like. Is it possible to make it a one liner? That is conditionally color the ff? I could not get the %1* to work inside the false part, so split into two statusline commands. set statusline+=%{ff=~'u'?'u':''} unix fileformat set statusline+=%1*%{ff=~'u'?'':strpart(ff,0,1)}%* not unix fileformat Bill -- 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
finding the originating map command
I have mapped ,cs to a function called CheckSyntax if I execute : map ,cs I get ,cs * :call CheckSyntax()CR if I execute :verbose map ,cs I get ,cs * :call CheckSyntax()CR Last set from /Users/http/run/baker/journal/000_main__journal.vim which helpful is tracking down mappings I might not need or want. However I would like to be able to 1)Find where the mapping originated i.e. I have the mapping in ~/.vim/plugin/tj_code_insert.vim 2)Find where a function originated i.e. where is CheckSyntax defined? TIA tim -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com -- 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
synIDattr used with matchadd
If I use the matchadd function to highlight a region given a pattern which is based upon a region, can I use the id returned by matchadd with the function synIDattr get get the fg and bg colors associated with the highlight group used? Or, can synIDattr only be used with ids associated with syntax groups? I tried and 1) it returned different values on subsequent runs and 2) I have a 256 color term but it returns only values between 0 and 15. Thanks Richard -- Quis custodiet ipsos custodes -- 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
Re: finding the originating map command
On 2012-07-02, Tim Johnson wrote: I have mapped ,cs to a function called CheckSyntax if I execute : map ,cs I get ,cs * :call CheckSyntax()CR if I execute :verbose map ,cs I get ,cs * :call CheckSyntax()CR Last set from /Users/http/run/baker/journal/000_main__journal.vim which helpful is tracking down mappings I might not need or want. However I would like to be able to 1)Find where the mapping originated i.e. I have the mapping in ~/.vim/plugin/tj_code_insert.vim I don't think Vim remembers any place but the last where a mapping was defined. However, you can start Vim like this, $ vim -V15verbose.out ... and capture all the ex commands to the file verbose.out. Then you can open that file and search for map\s\+,cs\ or filter verbose.out with something like this $ grep 'map[^I ][^I ]*,cs\\|^[^l]' verbose.out | grep -C2 map to find the various places where that mapping was defined. Those ^I pairs are literal tabs. The \|^[^l] is there to capture all the lines saying what file is being sourced, function being called, etc., without all the lines beginning with line other than the one(s) defining your mapping. 2)Find where a function originated i.e. where is CheckSyntax defined? :verbose function CheckSyntax will tell you where the function was last defined. HTH, Gary -- 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
Re: finding the originating map command
* Gary Johnson garyj...@spocom.com [120702 15:29]: On 2012-07-02, Tim Johnson wrote: I don't think Vim remembers any place but the last where a mapping was defined. However, you can start Vim like this, $ vim -V15verbose.out ... and capture all the ex commands to the file verbose.out. Then you can open that file and search for map\s\+,cs\ or filter verbose.out with something like this $ grep 'map[^I ][^I ]*,cs\\|^[^l]' verbose.out | grep -C2 map to find the various places where that mapping was defined. Those ^I pairs are literal tabs. The \|^[^l] is there to capture all the lines saying what file is being sourced, function being called, etc., without all the lines beginning with line other than the one(s) defining your mapping. 2)Find where a function originated i.e. where is CheckSyntax defined? :verbose function CheckSyntax will tell you where the function was last defined. That is great Gary, thanks for such a succint solution. cheers -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com -- 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