Re: C++ Syntax highlighting for Identifier, Statement

2007-01-15 Thread Dmitriy Yamkovoy

This might be possible using a tags file, which already gathers all
the class, variable, function, etc names (and their locations).  Maybe
a command (or autocommand) to create syntax objects based on a tags
file would do the trick?  I don't know how to do this, but maybe
someone else on the list can suggest a way.

-Dmitriy

On 1/14/07, Andy Wokula [EMAIL PROTECTED] wrote:

Matt England schrieb:
 I'm trying to get function names, class names, objects, variables and
 similar things to appear as non-white text with 'syntax on'.

Had the same question after editing with Visual Studio.
This is difficult, I haven't seen that before in any syntax file.
I think there are no means to do that in an easy way.
The file (and included files) needs to be parsed to collect all the user
defined names.  I think with some energy it should be possible, because
syntax definitions can be added and removed at any time.

Hopefully some of the gurus will answer?

Andy

--
EOF





___
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: 
http://mail.yahoo.de



Re: Commenting out TeX-text line by line in V-mode

2006-11-16 Thread Dmitriy Yamkovoy

Or you could skip step one, and only add percent signs on the lines
with anything in them:

(select lines visually)
:','s/^\(.\)/% \1

-Dmitriy

On 11/15/06, A.J.Mechelynck [EMAIL PROTECTED] wrote:

Meino Christian Cramer wrote:
 Hi,

  a question more driven by curiosity than by the need to change
  anything.


  Suppose you have the following TeX-text:

 bla blabla foo bar gnu gnats bla blabla foo bar gnu gnats bla blabla
 foo bar gnu gnats
 bla blabla foo bar gnu gnats

 bla blabla foo bar gnu gnats bla blabla foo bar gnu gnats bla blabla
 foo bar gnu gnats

 bla blabla foo bar gnu gnats


  and because this text is so fullfilled with wisdom and knowledge,
  that no one else than you will be able to handle its contents
  carefully ;) you decide to comment it out to not to harm the public.
  As a vim newbie I would do that using block oriented visual mode on
  the first line and I-nserting a '%' (TeX's comment sign), which
  results in:

  %  bla blabla foo bar gnu gnats bla blabla foo bar gnu gnats bla blabla
  %  foo bar gnu gnats
  %  bla blabla foo bar gnu gnats
  %
  %  bla blabla foo bar gnu gnats bla blabla foo bar gnu gnats bla blabla
  %  foo bar gnu gnats
  %
  %  bla blabla foo bar gnu gnats


  So far so nice...it works.

  But would be there a way to acchieve the following commenting:

  %  bla blabla foo bar gnu gnats bla blabla foo bar gnu gnats bla blabla
  %  foo bar gnu gnats
  %  bla blabla foo bar gnu gnats

  %  bla blabla foo bar gnu gnats bla blabla foo bar gnu gnats bla blabla
  %  foo bar gnu gnats

  %  bla blabla foo bar gnu gnats

  (blank lines not commented out) by a similiar simple command like
  CTRL-v SHIFT-i textESC ?

  As said: This Q is mostly curiosity - based...I even dont know,
  whether haveing such a feature would be really useful or not.

  But as always: Experimenting is fun! :O)

  Keep editing!
  mcc



1. Add all percent signs like you did above, even before blank lines.
2. Replace empty comments by blank (i.e. empty) lines as follows:

:%s/^%\s*$//


Best regards,
Tony.



Re: long line display in gvimdiff

2006-11-01 Thread Dmitriy Yamkovoy

It should apply on
a per-window basis, so you may have to execute it in each diff
window.



Or if you're feeling lazy,

:windo set wrap
:windo set nowrap

These enable or disable wrapping for all windows in the current tab.

-Dmitriy


Re: long line display in gvimdiff

2006-11-01 Thread Dmitriy Yamkovoy

I didn't know about @:, thanks!

-Dmitriy

On 11/1/06, Tim Chase [EMAIL PROTECTED] wrote:

 It should apply on
 a per-window basis, so you may have to execute it in each diff
 window.

 Or if you're feeling lazy,

 :windo set wrap
 :windo set nowrap


If you only have the two diff windows open, this is about as
efficient as control+W control+W at colon to change windows and
re-execute the last-issued commandline.  Also, less finger
dancing and a bit more readable.

However, if you have multiple windows open, and only a subset of
them are diff windows, the windo solution may effect windows
that you don't want it to.

But yes, this is helpful for easily changing a settings in all
the open windows.

-tim





Re: Key mapping on , and . with CTRL

2006-10-27 Thread Dmitriy Yamkovoy

You might also want to see the conversation earlier this week about
which Control-keys are considered cross-platform.  I think it was C-@
and C-A through C-Z, and the rest are not guaranteed to work on all
systems.

-Dmitriy

On 10/27/06, Peter Hodge [EMAIL PROTECTED] wrote:

Hello,

I think it depends on what your terminal can understand.  One way you can find
it out is to type ':map ' (using command mode), then press CTRL-V and then the
key sequence you want to map.  For example, to map CTRL-L you could use ':map
CTRL-VCTRL-L'.

regards,
Peter



--- Zhaojun WU [EMAIL PROTECTED] wrote:

 Hi, Vimmers,

 Is there any way to map the comma and period with CTRL such as:
 map C-,  :foo
 map C-.  :foo
 It seems the , and . cannot be used here directly. How can I do in
 this case?

 Another question is how I can check all of the current key mappings in
 VIM? I remembered I saw something about it before, but failed to find
 it out.

 Thanks,
 --
 Best,
 Zhaojun



Send instant messages to your online friends http://au.messenger.yahoo.com



Single-File Vim?

2006-09-22 Thread Dmitriy Yamkovoy

Hi all,
Is there a binary compiled for Windows which allows me to run Vim
without any of the runtime files?  Long story short, I want something
I can keep online or on a USB key and just copy to the desktop of any
computer I sit at.

Thanks,
-Dmitriy


Re: Single-File Vim?

2006-09-22 Thread Dmitriy Yamkovoy

Thanks, guys, that helps.  I guess if I really want it to be a single
file, I could try a self-extracting zip file.   I'll tell you how that
goes.

-Dmitriy

On 9/22/06, Gary Johnson [EMAIL PROTECTED] wrote:

On 2006-09-22, Yakov Lerner [EMAIL PROTECTED] wrote:
 On 9/22/06, Dmitriy Yamkovoy [EMAIL PROTECTED] wrote:
  Hi all,
  Is there a binary compiled for Windows which allows me to run Vim
  without any of the runtime files?  Long story short, I want something
  I can keep online or on a USB key and just copy to the desktop of any
  computer I sit at.

 I assume that if the whole $VIMRUNTIME tree is on your
 USB, and you setenv VIMRUNTIME to that location,
 vim.exe will happily access whole $VIMRUNTIME tree
 from there, no ? Is this good enough ?

According to

:help VIMRUNTIME
:help VIM

setting $VIM would be a better choice than setting $VIMRUNTIME.
Further, :help VIM says that on Windows, Vim tries to use the
directory name of the executable to find VIM.  So depending on how
Dmitriy intends to invoke the vim on his USB key, it may not be
necessary to set $VIM or $VIMRUNTIME at all.

Gary

--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
 | Spokane, Washington, USA



Re: What is the key nameing of...

2006-09-21 Thread Dmitriy Yamkovoy

Ctrl-V does exactly this.  You can go into insert mode, then hit C-V,
Ctrl+Up and it will display:

C-Up

You can :help keycodes to see a list of others.

On 9/21/06, Meino Christian Cramer [EMAIL PROTECTED] wrote:

Hi,

 I often have the problem to guess, how a certain keysequence is named
 by the syntax of the vim scripting language.

 Recently I tried to map Control-CursorUp but it simply does not work
 for me.

 Is there any function/script/hack/trick/* like Ctrl-v is for the raw
 keysequence to display the key thingy?

 Something like (example!)  :

 :showkeyCR

 will display

 :press key

 then one presses the key in question (for example Alt plus F11...)
 and then it displays:

 :C-F11

 ...

 (an example only just to get around my limitied power of
 explanation... ;O)

 

 Keep hacking!
 mcc