--
--
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
I have some basic questions about how things work in vim.
Is it true that every key command executes a function? Say the key command »%«
performed on a bracket jumps to the matching closing bracket. Is there a
function defined like MatchBracket()? If this is true, how can I see which key
command executes which function?
Regards
Marco
--
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
Someone on the list pointed me to this:
I use StlShowFunc for this; see http://mysite.verizon.net/astronaut/vim/index.html#STLSHOWFUNC
I have not used it.
I follow you on "blogs"...so will be interesting to see what comes out.
--
Robert
Nick,
Since you are new to C++, you are likely to write mostly single-file
console/terminal programs. For this kind of work, I would modestly
recommend my own :) plug-in Side-C (script #2434).
It's a very simple gvim IDE for at least Linux and Windows that
transparently invokes the compiler, opens/closes the quickfix
(i.e. error message) window as necessary, runs the executable
program in several modes, and does several other useful things.
I myself happily use it on a daily basis so it must be good enough :)
Boyko
--
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
Unprintable characters basically are control characters
:h 'isprint
Tab is a control character - when 'listchars' does not include
'tab:xy', then tab will be printed as '^I'.
"nbsp" was added recently, maybe just forgotten to be implemented for
:list ...
:list is such a rarely used command ...
--
Andy
--
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
With spaces to make it readable:
First command:
:%s/ \\ \@<! \%( \\ \\ \) * \\ \\ \@! / \\ & / g
works as follows.
Find an odd number of backslashes (one or more):
\%( \\ \\ \) * \\
The above will find '\\\' at the start of '\\\\' (which is bad); make
sure no '\' follows the match:
\%( \\ \\ \) * \\ \\ \@!
Now the above will find '\\\' at the end of '\\\\' (after backtracking,
the next try starts one position to the right); make sure no '\'
precedes the match:
\\ \@<! \%( \\ \\ \) * \\ \\ \@!
Eventually, '\','\\\',... are found and '\\','\\\\',... are skipped.
The replace part is: a backslash plus the whole matched text.
Second command:
:%s/ \\ \@<! \%( \%( \\ \\ \) * \) \@> \\ / \\ & / g
This one makes use of \@> (rarely to be found in patterns).
Find an odd number of '\':
\%( \%( \\ \\ \) * \) \@> \\
The above will find '\\\', but not at the start of '\\\\', because
'\\\\' is matched by \%( \\ \\ \) * and the surrounding \@> disables
backtracking (which would allow a match for the following \\ ).
Now when the whole pattern (so far) fails, the next try starts one
position to the right, allowing a match for '\\\' at the end of '\\\\'.
Like with the first command, this is avoided with \\ \@<! .
Third command:
:%s/ \\ \\ \= / \\ \\ / g
This one processes each encountered backslash, no problem with
backtracking then.
Get help:
:h pattern
:h /\@!
:h sub-replace-special
etc.
--
Andy
--
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
You need scanf like expressions. Don't ask me why - this seems to work:
set efm=%*[^\ ]%*[\ ]%*[^\ ]%*[\ ]%*[^\ ]%*[\ ]%*[^\ ]%*[\ ]%f\ %l%m
match no spaces:
%*[^\ ]
match spaces:
%*[\ ]
repeat until path is expected...
Marc Weber
--
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