RE: count and v:operator not set correctly in vim7.3

2010-09-09 Thread John Beckett
yoru.007 wrote: > Did anyone come into this problem? I typed "d2w" and "3d2w" > in normal mode and ":echo v:count", the result were all 0. The problem is that when you type ":echo v:count" there is no count (it was a previous command which had a count). Borrowing from ':help v:count', you could t

Re: copy vim text through screen windows

2010-09-09 Thread 曹锡韬
在 2010-09-09四的 11:18 +0530,Moses N写道: > Hi Dave, >Thanks for that tip. Is is possible to the get just the code > snippet that will help me copy the register contents to a file? want this ? :enew :"xp(x is your register) :w file -- You received this message from the "vim_use" maillist.

RE: count and v:operator not set correctly in vim7.3

2010-09-09 Thread yoru.007
>The problem is that when you type ":echo v:count" there is >no count (it was a previous command which had a count). >Borrowing from ':help v:count', you could try this: > :map :echo "the count is " . v:count >3d2 >That is, type 3 then d then 2 then press F8 to invoke the >mapping. It displays

OmniCppComplete with namesapce can't work

2010-09-09 Thread 777
Hello All: I use OmniCppComplete, when I use namesapce, can't complete C1's member. If don't use namespace it work. It a bug? The Omni plugin is too old, Now have a new one? Thanks. namespace TTT { //<-- namespace class C1 { int a; int b; int c; }; } //<

"have tabs after the first non-blank inserted as spaces"

2010-09-09 Thread livim
Hi ! In options.txt ( :help tabstop) there is such a sentence: 4. Always set 'tabstop' and 'shiftwidth' to the same value, and 'noexpandtab'. This should then work (for initial indents only) for any tabstop setting that people use. It might be nice to have tabs

"have tabs after the first non-blank inserted as spaces"

2010-09-09 Thread livim
Hi ! In options.txt ( :help tabstop) there is such a sentence: 4. Always set 'tabstop' and 'shiftwidth' to the same value, and 'noexpandtab'. This should then work (for initial indents only) for any tabstop setting that people use. It might be nice to have tabs

Re: copy vim text through screen windows

2010-09-09 Thread Moses N
Hi, I did the following and got it to work. Thanks for your help map ,y :redir! > ~/a.txt silent echo @0 redir END map ,p :read ~/a.txt Cheers, Moses On Thu, Sep 9, 2010 at 12:32 PM, 曹锡韬 wrote: > 在 2010-09-09四的 11:18 +0530,Moses N写道: > > Hi Dave, > >Thanks for that tip. Is is possi

Re: copy vim text through screen windows

2010-09-09 Thread bill lam
Срд, 08 Сен 2010, Moses N писал(а): > Hi, >I use vim 7.1 with GNU screen by connecting to a development server > through putty. I am not able to copy vim text from one screen window and > paste it on the other. My vim is compiled with +xterm_clipboard and i have > done :set clipboard=unnamed.

How to copy the name of the variable / function under the cursor?

2010-09-09 Thread Dotan Cohen
Is there a quick way to copy the name of the variable / function under the cursor (respecting word boundaries) to the clipboard without having to meticulously highlight and copy it in the regular fashion? -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- You received this messag

Re: How to copy the name of the variable / function under the cursor?

2010-09-09 Thread Jürgen Krämer
Hi, Dotan Cohen wrote: > Is there a quick way to copy the name of the variable / function under > the cursor (respecting word boundaries) to the clipboard without > having to meticulously highlight and copy it in the regular fashion? "+yiw Note that this command will move the cursor to the st

How to make saveas default to original file's directory?

2010-09-09 Thread lessthanideal
I'm using Windows VIM 7.3.2 (the Vim without Cream build) :saveas puts the new file into the current working directory if no path is specified. I want it to default to the directory of the original file. Example, from new VIM session :cd c:\test :e c:\h.txt " cwd is still c:\test :sav h2.txt

Re: How to make saveas default to original file's directory?

2010-09-09 Thread lessthanideal
On Sep 9, 1:06 pm, lessthanideal wrote: > I've tried to do it by using BufFilePre and BufFilePro Sorry for typo, that should read BufFilePre and BufFilePost -- 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

RE: "have tabs after the first non-blank inserted as spaces"

2010-09-09 Thread John Beckett
livim wrote: > I can't understand " It might be nice to have tabs after the > first non- blank inserted as spaces if you do this though. " > Who can give me some illustration? I do not know what the help text is saying. However, see: http://vim.wikia.com/wiki/Indent_with_tabs%2C_align_with_spaces

RE: count and v:operator not set correctly in vim7.3

2010-09-09 Thread John Beckett
yoru.007 wrote: > but 3d2w still gives "the count is0" The point is that 3d2w is a complete command. The count is used by that command. After that, you press F8, but that is a NEW command and it has no count. John -- You received this message from the "vim_use" maillist. Do not top-post! Type y

Re: "have tabs after the first non-blank inserted as spaces"

2010-09-09 Thread Christian Brabandt
On Thu, September 9, 2010 11:36 am, livim wrote: > I can't understand " It might be nice to have tabs after the first non- > blank inserted as spaces if you do this though. " > Who can give me some illustration? imap getline('.')[0:col('.')-1]=~'^\s*$'?'' : repeat(' ', &ts) (one line, untested)

Re: copy vim text through screen windows

2010-09-09 Thread Moses N
Hi, Thanks for the screen tip, its a really nice one. The only disadvantage is when I have :se nu or when i have vertical windows, i cannot do whole line copy. Anyway its seems a great one otherwise. Thanks a lot. -Moses On Thu, Sep 9, 2010 at 4:32 PM, bill lam wrote: > Срд, 08 Сен 2010,

Re: copy vim text through screen windows

2010-09-09 Thread Moses N
ok, that makes sense. Thanks. On Thu, Sep 9, 2010 at 11:31 AM, Gary Johnson wrote: > On 2010-09-09, Moses N wrote: > > > On Wed, Sep 8, 2010 at 7:22 PM, David Fishburn > wrote: > > > > On 9/8/2010 7:19 AM, Moses N wrote: > > > > Hi, > >I use vim 7.1 with GNU screen by c

Re: Esc key on gvim 7.2 does not work on windows XP

2010-09-09 Thread albert kao
On Thu, Sep 9, 2010 at 1:42 AM, Jürgen Krämer wrote: > > Hi, > > albert kao wrote: > > The Esc key running on gvim 7.2 does not work on a windows XP > Professional SP3 computer. > > i.e. pressing the "Esc" key does not exit the current insert mode. > > "Ctrl-[" does not work either. > > > > The "T

Re: How to make saveas default to original file's directory?

2010-09-09 Thread Christian Brabandt
On Thu, September 9, 2010 2:10 pm, lessthanideal wrote: > > On Sep 9, 1:06 pm, lessthanideal > wrote: >> I've tried to do it by using BufFilePre and BufFilePro > > Sorry for typo, that should read BufFilePre and BufFilePost If you don't mind changing your cwd, I would simply set autochdir regard

Re: shifting paragraphs by one space

2010-09-09 Thread Cesar Romani
On 08/09/2010 11:46 a.m., sandeep kapse wrote: > Thanks for reply. > > I know these thing. > Actually I need the shift width size of 4. > I don't want to change again and again > while processing text. > May time I need to move set of line to the left or right just by one > place. > Is there other

Re: external compiler output into window/buffer/quickfix from vim

2010-09-09 Thread Jeri Raye
For example like this output: # Model Technology ModelSim ALTERA vcom 6.5b Compiler 2009.10 Oct 1 2009 # -- Loading package standard # -- Loading package textio # -- Loading package std_logic_1164 [...] # -- Compiling entity cntrlio_module # -- Compiling architecture rtl of cntrlio_module # -- Co

Re: How to make saveas default to original file's directory?

2010-09-09 Thread sc
On Thursday 09 September 2010 08:41:02 Christian Brabandt wrote: > On Thu, September 9, 2010 2:10 pm, lessthanideal wrote: > > On Sep 9, 1:06 pm, lessthanideal > > > > > > wrote: > >> I've tried to do it by using BufFilePre and BufFilePro > > > > Sorry for typo, that should read BufFilePre and Bu

Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread Andrey
Hi, I've been really happy working with vim in Linux, but now I'm in Windows and tags in Vim seem broken. Here is my config: Gvim 7.3, ctags 5.8, omnicppcomplete (0.41), WinXP SP3 Now, I was trying to parse the Bada platform includes as well as STL from Visual Studio with the command: ctags -R --c

Re: Navigation in vi

2010-09-09 Thread Ben Fritz
On Sep 9, 12:36 am, Alessandro Antonello wrote: > > Also I don't like much the implementation of TABs in VIM. The perspective of > buffers in VIM is much more similar to a MDI interface on Windows > which I find most > useful so, I also use MiniBufExplorer: > "http://www.vim.org/scripts/script.p

Re: Dealing with viminfo overwriting? -> :set vi=n..

2010-09-09 Thread Ben Fritz
On Sep 8, 10:45 am, "Benjamin R. Haskell" wrote: > > Interesting idea.  Kind-of solves half of the problem (prevents losing > .viminfo data), but doesn't seem to lend itself to the other part of > what I want (contents of all .viminfos' command histories available from > everywhere). > I see :h

Re: "have tabs after the first non-blank inserted as spaces"

2010-09-09 Thread Benjamin R. Haskell
On Thu, 9 Sep 2010, Christian Brabandt wrote: On Thu, September 9, 2010 11:36 am, livim wrote: I can't understand " It might be nice to have tabs after the first non- blank inserted as spaces if you do this though. " Who can give me some illustration? imap getline('.')[0:col('.')-1]=~'^\s*$

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread 曹锡韬
在 2010-09-09四的 06:13 -0700,Andrey写道: > Hi, > I've been really happy working with vim in Linux, but now I'm in > Windows and tags in Vim seem broken. > > Here is my config: Gvim 7.3, ctags 5.8, omnicppcomplete (0.41), WinXP > SP3 > Now, I was trying to parse the Bada platform includes as well as ST

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread Andriy Y
It's not about saving tags file. The file is created, I see it, rename it to "bada" (from default "tags"). It's about vim ignores file with tags, be it Program Files\Vim\bada or .\tags - and I don't know why. Andrey On Thu, Sep 9, 2010 at 6:29 PM, 曹锡韬 wrote: > 在 2010-09-09四的 06:13 -0700,Andrey写

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread Benjamin R. Haskell
[reversed top-posting] On Thu, 9 Sep 2010, Andriy Y wrote: > > On Thu, Sep 9, 2010 at 6:29 PM, 曹锡韬 wrote: > 在 2010-09-09四的 06:13 -0700,Andrey写道: > > Hi, > > I've been really happy working with vim in Linux, but now I'm in > > Windows and tags in Vim seem broken. > > > > Here is my config: Gvi

Re: How to make saveas default to original file's directory?

2010-09-09 Thread Gary Johnson
On 2010-09-09, lessthanideal wrote: > I'm using Windows VIM 7.3.2 (the Vim without Cream build) > > :saveas puts the new file into the current working directory if > no path is specified. I want it to default to the directory of > the original file. > > Example, from new VIM session > :cd c:\tes

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread Andriy Y
2010/9/9 Benjamin R. Haskell > [reversed top-posting] > > > On Thu, 9 Sep 2010, Andriy Y wrote: > > > > On Thu, Sep 9, 2010 at 6:29 PM, 曹锡韬 wrote: >> > 在 2010-09-09四的 06:13 -0700,Andrey写道: >> > > Hi, >> > > I've been really happy working with vim in Linux, but now I'm in >> > > Windows and tags

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread Andriy Y
On Thu, Sep 9, 2010 at 7:04 PM, Andriy Y wrote: > > > 2010/9/9 Benjamin R. Haskell > > [reversed top-posting] >> >> >> On Thu, 9 Sep 2010, Andriy Y wrote: >> >> > > On Thu, Sep 9, 2010 at 6:29 PM, 曹锡韬 wrote: >>> > 在 2010-09-09四的 06:13 -0700,Andrey写道: >>> > > Hi, >>> > > I've been really happy

Re: shifting paragraphs by one space

2010-09-09 Thread Gary Johnson
On 2010-09-09, Cesar Romani wrote: > On 08/09/2010 11:46 a.m., sandeep kapse wrote: > > Thanks for reply. > > > > I know these thing. > > Actually I need the shift width size of 4. > > I don't want to change again and again > > while processing text. > > May time I need to move set of line to the l

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread 曹锡韬
在 2010-09-09四的 19:04 +0200,Andriy Y写道: > > I copied bada to folder with sources. Renamed to "tags". Executed > "gvim .". The command :tags still shows empty list. > :tags command will show nothing if you haven't use tag to jump somewhere. use :set tags?to see if your project has included

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread Andriy Y
On Thu, Sep 9, 2010 at 7:15 PM, 曹锡韬 wrote: > 在 2010-09-09四的 19:04 +0200,Andriy Y写道: > > > > > > I copied bada to folder with sources. Renamed to "tags". Executed > > "gvim .". The command :tags still shows empty list. > > > :tags command will show nothing if you haven't use tag to jump > somewher

Re: shifting paragraphs by one space

2010-09-09 Thread Christian Brabandt
Hi Gary! On Do, 09 Sep 2010, Gary Johnson wrote: > On 2010-09-09, Cesar Romani wrote: > > On 08/09/2010 11:46 a.m., sandeep kapse wrote: > > > Thanks for reply. > > > > > > I know these thing. > > > Actually I need the shift width size of 4. > > > I don't want to change again and again > > > whil

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread 曹锡韬
在 2010-09-09四的 19:19 +0200,Andriy Y写道: > > Okay, thanks. But the other question remains: why neither > set tags+="c:/Program Files/Vim/bada" > nor > set tags+="c:\\Program Files\\Vim\\bada" > work ? Guess it is the blank in "Program Files" that causes it. May be set tags+=c:\Program\ Files\Vim

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread Andriy Y
On Thu, Sep 9, 2010 at 7:28 PM, 曹锡韬 wrote: > 在 2010-09-09四的 19:19 +0200,Andriy Y写道: > > > > > Okay, thanks. But the other question remains: why neither > > set tags+="c:/Program Files/Vim/bada" > > nor > > set tags+="c:\\Program Files\\Vim\\bada" > > work ? > > Guess it is the blank in "Program F

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread Benjamin R. Haskell
On Thu, 9 Sep 2010, Andriy Y wrote: [...] But the other question remains: why neither set tags+="c:/Program Files/Vim/bada" nor set tags+="c:\\Program Files\\Vim\\bada" work ? And should there be a string ? In unix version I see set tags+=~/path/tags , not set tags+="~/path/tags" Ah, yes, tha

ctrl-W, ctrl-V scroll

2010-09-09 Thread Jiri Pirko
Hi there. I'm having an issue splitting the screen. I open some document, I do ctrl-w,ctrl-v. Window is splitted up, that's fine. But the left window is scrolled down so the line where the cursor was is on the top of the screen. Is there any way to disable this scrolling? Thanks a lot! Jirka

Re: ctrl-W, ctrl-V scroll

2010-09-09 Thread Andriy Y
On Thu, Sep 9, 2010 at 4:26 PM, Jiri Pirko wrote: > Hi there. > > I'm having an issue splitting the screen. > > I open some document, I do ctrl-w,ctrl-v. Window is splitted up, that's > fine. > But the left window is scrolled down so the line where the cursor was is on > the > top of the screen.

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread Rahul
On Sep 8, 12:48 am, "Christian Brabandt" wrote: > >> I was wondering if vim had a smart way of dealing with this?! > > > You could use the new conceal support in Vim 7.3. > > Have never used it, but I believe AnsiEsc[1] by Charles Campbell does > conceal color codes. Thanks Christian and Simon. T

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread Simon Ruderich
On Thu, Sep 09, 2010 at 01:06:39PM -0700, Rahul wrote: > [snip] > > How do I enable the "conceal" option at compile time? I tried './ > configure --enable-conceal' but doesn't work. > > Or do I have to actually pull the patches from the conceal developers > website? I am confused! Any tips? You ne

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread sc
On Thursday 09 September 2010 15:06:39 Rahul wrote: > On Sep 8, 12:48 am, "Christian Brabandt" wrote: > > >> I was wondering if vim had a smart way of dealing with > > >> this?! > > > > > > You could use the new conceal support in Vim 7.3. > > > > Have never used it, but I believe AnsiEsc[1] by

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread Rahul
On Sep 9, 3:43 pm, sc wrote: > On Thursday 09 September 2010 15:06:39 Rahul wrote: > you need at least a big build to have conceal, normal won't > include it -- look at the output of > >     :ver Thanks! I did a "huge" build now. Have a +conceal and a +syntax. Still can't use AnsiEsc successfully

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread Christian Brabandt
Hi Rahul! On Do, 09 Sep 2010, Rahul wrote: > On Sep 9, 3:43 pm, sc wrote: > > On Thursday 09 September 2010 15:06:39 Rahul wrote: > > you need at least a big build to have conceal, normal won't > > include it -- look at the output of > > > >     :ver > > Thanks! I did a "huge" build now. Have a

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread sc
On Thursday 09 September 2010 16:47:31 Rahul wrote: > On Sep 9, 3:43 pm, sc wrote: > > On Thursday 09 September 2010 15:06:39 Rahul wrote: > > you need at least a big build to have conceal, normal won't > > include it -- look at the output of > > > > :ver > Thanks! I did a "huge" build now.

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread Rahul
On Sep 9, 5:17 pm, sc wrote: > > the first thing i'd try is renaming those files so they end > with .vim -- restart vim and see if you can't use it now Did that. Renamed files. Restarted vim > you're right to wonder why they have funny endings -- did you > gunzip the vba.gz before vimming it? Y

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread Rahul
On Sep 9, 4:58 pm, Christian Brabandt wrote: > That does not sound right. Usually those files should be called .vim. I renamed them now. They had an additional extension before that looked like a control character > I haven't used AnsiEsc yet, but if I see that right, you should have the > follo

Re: Show the list of the file in vim just like the catgs list, how to do ?

2010-09-09 Thread Daniel Corrêa
> i have ever seen the file list in gvim that let you point it and open the > file that you choose by mouse , Check out the NERDTree plugin from Vim's site, it does have mouse support. Cheers, -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the t

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread sc
On Thursday 09 September 2010 17:47:38 Rahul wrote: > On Sep 9, 5:17 pm, sc wrote: > > the first thing i'd try is renaming those files so they end > > with .vim -- restart vim and see if you can't use it now > Did that. Renamed files. Restarted vim > > you're right to wonder why they have funny

Escaping norm

2010-09-09 Thread Tim Johnson
(using Huge version with GTK2 GUI on ubuntu 10.04 32-bit) I have the following function: " code function! PHPStubs() let wrd=expand("") echo "wrd: " . wrd if wrd == "forek" exe "norm! bdWaforeach($array as $key=>$val){\}\k9l\" endif endfunction " /

ctags + Java

2010-09-09 Thread Nathan Neff
Hello, I decided to conquer my fear/frustration of ctags, and found that Vim doesn't like the format that's generated by ctags for Java files (at least on Ubuntu 10.4.) I find it odd, since the man page in ctags states that it supports Java files. I used a simple Java class in Foo.java: public

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread 777
namespace Add default namespace __???_STL (see in .h file) 2010/9/10 Benjamin R. Haskell : > On Thu, 9 Sep 2010, Andriy Y wrote: > >> [...] But the other question remains: why neither >> set tags+="c:/Program Files/Vim/bada" >> nor >> set tags+="c:\\Program Files\\Vim\\bada" >> work ? >> >> And s

Re: Escaping norm

2010-09-09 Thread Tim Johnson
* Tim Johnson [100909 15:49]: > (using Huge version with GTK2 GUI on ubuntu 10.04 32-bit) > > I have the following function: > > " code > function! PHPStubs() > let wrd=expand("") > echo "wrd: " . wrd > if wrd == "forek" > exe "norm! bdWaforeach($array as > $key=

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

2010-09-09 Thread 777
:help omnicpp-faq 2010/9/10 777 : > namespace > Add default namespace __???_STL (see in .h file) > > > 2010/9/10 Benjamin R. Haskell : >> On Thu, 9 Sep 2010, Andriy Y wrote: >> >>> [...] But the other question remains: why neither >>> set tags+="c:/Program Files/Vim/bada" >>> nor >>> set tags+="c

Re: Somehowofftopic: Cursorkeys with *vi* on Solaris...

2010-09-09 Thread meino . cramer
bill lam [10-09-09 18:12]: > Чтв, 09 Сен 2010, meino.cra...@gmx.de писал(а): > > Hi, > > > > this is a somehow offtopic question, but I need a little help to > > survive... ;) > > > > At work I am urged to use the plain vi on a SUN Solaris (5.3, I think) > > workstation very often. > > I cannot

How to maximize help window automatically ?

2010-09-09 Thread Lenin Lee
Hi there, Why the following configuration doesn't work ? au BufEnter help _ How to maximize help window automatically when I open or enter it ? Thanks. Lenin -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For mor

Re: How to maximize help window automatically ?

2010-09-09 Thread Gary Johnson
On 2010-09-10, Lenin Lee wrote: > Hi there, > > Why the following configuration doesn't work ? > > au BufEnter help _ > > How to maximize help window automatically when I open or enter it ? The autocommand command is an ex command whereas the key sequence _ is a normal-mode command. To make th

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread Christian Brabandt
On Fri, September 10, 2010 12:57 am, Rahul wrote: > :help AnsiEsc still doesn't work. Is there a command that forces vim > to re-index its help docs? Yes, it's called :helptags. Run it like :helptags ~/.vim/doc/ (I think you need to restart vim) The vimball plugin is supposed to run it. May be yo

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread Christian Brabandt
On Fri, September 10, 2010 12:47 am, Rahul wrote: > If I do :AnsiEsc I get this error: > > Error detected while processing function AnsiEsc#AnsiEsc: > line 139: > E62: Nested \= > E475: Invalid argument: ansiStop^I^I"\e\[0\{1,2}\=m" I am CC'ing Charles. As he is the maintainer, he probably knows