selective increment numbers in substitute

2013-10-07 Thread Yosi Izaq
Hi, I want to selectively increment numbers in substitute. I'm familiar w/ submatch for increment all numbers in substitute, like in vis. mode range: ','s/\d\+/\=submatch(0)+1/gc But what if I want to increment numbers only of lines containing a preceding pattern, say Number. For instance: 1

Re: selective increment numbers in substitute

2013-10-07 Thread yosi izaq
On Mon, Oct 7, 2013 at 5:42 PM, Ben Fritz fritzophre...@gmail.com wrote: On Monday, October 7, 2013 8:00:38 AM UTC-5, Yosi Izaq wrote: Hi, I want to selectively increment numbers in substitute. I'm familiar w/ submatch for increment all numbers in substitute, like in vis. mode range

Re: How to emphesize or color a few key words on the fly

2011-09-06 Thread yosi izaq
On Mon, Sep 5, 2011 at 10:30 PM, yosi izaq wrote: On Mon, Sep 5, 2011 at 7:05 PM, Elias Diem wrote: Probably this helps you http://vim.wikia.com/wiki/Highlight_multiple_words Elias Indeed. Thank you! Short Q. plz. It so turns out that my two main keyboards are, albeit fancy

How to emphesize or color a few key words on the fly

2011-09-05 Thread Yosi Izaq
Hi, I'm referring to something like syntax files do - color keywords of language. However, instead of static definition I'm looking for a convenient way to color, say in yellow, the last two or three searched patters. This could be useful when analyzing dense source code and I saw at least

Re: How to emphesize or color a few key words on the fly

2011-09-05 Thread yosi izaq
On Mon, Sep 5, 2011 at 7:05 PM, Elias Diem wrote: Probably this helps you http://vim.wikia.com/wiki/Highlight_multiple_words Elias Indeed. Thank you! -- 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

The right way to do global operatot in visually selected block?

2011-03-13 Thread Yosi Izaq
Hi, As per subject. For instance, how to delete all lines containing pattern X from visual block. I know how to do substitute (use %V or range) and after a short trial error to apply ed commands (like d or m) I came up with ','g/X/d Is this the correct way or am I working too hard?

Re: Cygwin+Windows 7+gvim woes

2011-01-06 Thread yosi izaq
S. Cowles: i have found this problem with almost every project i build from source in win7 under cygwin. the fix is rather straightforward, and is a cygwin issue, not a vim issue: it is necessary to rebase all applications, libraries, and dll's in cygwin. the simple cookbook is: 1.

Cygwin+Windows 7+gvim woes

2011-01-04 Thread Yosi Izaq
Hi, I've upgrade from XP to windows 7 and now gvim launched from Cygwin spews errors on startup. Sometime gvim would load but at other times it would fail that. An example of the errors: [No Name] [FORMAT=unix] [TYPE=] [ASCII=000] [HEX=00] [POS=,0001] [100%] [LEN=1] 0 [main] gvim 7404

Re: Problem with VIM GUI

2010-08-31 Thread yosi izaq
First step: see if it's a problem in your configuration. Launch vim with: gvim -N -u NONE -i NONE Does the same behavior occur? Yes. So this test result concldes that there's no configuration problem. right? I am now more convinced that this is caused by a Cygwin Xwin (ver. 1.8.2)

Re: Problem with VIM GUI

2010-08-31 Thread yosi izaq
Note that the issue is gone after restart of Cygwin, though after a certain amount of time that the X server is up, it returns. So, looks like a Cygwin X server bug with a workaround - restart Cygwin. I think the Linux problem is derivative of the Cygwin problem. I.e. I'm sshing from Cygwin Xterm

Problem with VIM GUI

2010-08-30 Thread Yosi Izaq
Hi, I have this strange condition happening both on Cygwin gvim (and vim - g) and on Linux. The gvim GUI is missing menu bar (the one with File, Edit etc) and the main window is not usable, i.e. it's not possible to enter text. Either that or it's in a font so small as render it invisible. See

Re: how to read long shell output

2010-08-23 Thread yosi izaq
On Sun, Aug 22, 2010 at 6:16 PM, Charles E Campbell Jr wrote: Check out RunView (http://mysite.verizon.net/astronaut/vim/index.html#RUNVIEW) Regards, Chip Campbell Looks cool but probably an overkill. That page seems to have a treasure of useful scripts though. On Sun, Aug 22, 2010 at 8:59

how to read long shell output

2010-08-22 Thread Yosi Izaq
Hi, Say I'm executing a shell command with long output and want to read the results. Just running the cmd will only show the last lines of output. The question is how to make VIM present it in a scrollable window (w/o writing to explicit file...)?- Alternately, how to direct the output to

Re: how to read long shell output

2010-08-22 Thread yosi izaq
Aaron Lewis: should work with standard unix command `less` and pipe , did you try with it ? ! cd %:h nm `find .. -name *.so ` | less cr Doesn't work. See: Error detected while processing /users/yizaq/.vimrc: line 534: E492: Not an editor command: less cr Christian Brabandt: How about :r!

Re: how to display registers 0-9?- concise way enhanced #,*

2010-08-09 Thread yosi izaq
On Thu, Aug 5, 2010 at 8:44 PM, ZyX zyx@gmail.com wrote: Ответ на сообщение how to display registers 0-9?- concise way enhanced #,*, присланное в 16:54:56 05 августа 2010, Четверг, отправитель Yosi Izaq: execute 'registers '.join(range(0, 9)) ? ``execute'' may be truncated to ``exe

Re: how to display registers 0-9?- concise way enhanced #,*

2010-08-09 Thread yosi izaq
On Mon, Aug 9, 2010 at 6:07 PM, ZyX zyx@gmail.com wrote: Ответ на сообщение Re: how to display registers 0-9?- concise way enhanced #,*, присланное в 16:50:14 09 августа 2010, Понедельник, отправитель yosi izaq: Any idea re. how to search for WORD with */# shortcuts?- Can I make a map

how to display registers 0-9?- concise way enhanced #,*

2010-08-05 Thread Yosi Izaq
Hi, As per subject. Yes :reg 0123456789 will do but aside from map is there a more concise way? like: :reg seq(0,9) I know it doesn't work, is there an equivalent that does? note, :regi could do but it's overkill and takes more time... Oh, and is there a WORD search equivalent to #,* (that

search for output of shell command

2010-06-20 Thread Yosi Izaq
Hi, For example, search for line starting with current day (^17). How can it be done?- The following doesn't work: /^r!date | awk '{print $3}' I tried a few permutations but didn't figure out how to make it one liner (in two commands it's simple, read to register and use it's content in search

Re: search for output of shell command

2010-06-20 Thread yosi izaq
Hi, inline, For your particular use-case, I'd use vim's internal strftime() function:  :nnoremap f4 /^c-r=strftime('%d')crbslashcr  :cnoremap f4 c-r=strftime('%d')cr This works well. Can you please kindly explain why the 2nd line? You don't mention what single-digit dates look like in

Re: search for output of shell command

2010-06-20 Thread yosi izaq
more inline On Sun, Jun 20, 2010 at 4:25 PM, Tim Chase v...@tim.thechases.com wrote: On 06/20/2010 08:01 AM, yosi izaq wrote: For your particular use-case, I'd use vim's internal strftime() function:  :nnoremapf4  /^c-r=strftime('%d')crbslashcr  :cnoremapf4  c-r=strftime('%d')cr

Re: how to count # of paragraphs

2010-06-14 Thread yosi izaq
:%s/\(\[\_p\{-}]\)\|\(\%^\|^\n\)\@=\(\p\+\n\)\{-1,}\ze\(^\n\|\%$\)//n BTW, I tested both :%s/\(\[\_p\{-}]\)\|\(\%^\|^\n\)\@=\(\p\+\n\)\{-1,}\ze\(^\n\|\%$\)//n and :%s/\(\[\_p\{-}]\)//n Both worked well for my file and returned the same number. Why do you need all the or part, match start and

Re: how to count # of paragraphs

2010-06-13 Thread yosi izaq
On Thu, Jun 10, 2010 at 6:06 PM, Yosi Izaq izaq...@gmail.com wrote: Hi, I'm familiar with the %s/patt//n trick to count the # of patterns in the file. I would like to ask how to count the # of paragraphs in a file. My question has 2 flavors: 1. Count free text paragraphs separated by empty

Re: how to count # of paragraphs

2010-06-13 Thread yosi izaq
I tested against this text: === text starts here === [ l1 l2 l3 ] [ l4 l5 ] l1 l2 l3 l4 l1 l2 l3 l4 l5 == text ends here The following command finds four matches on the previous text:

how to count # of paragraphs

2010-06-10 Thread Yosi Izaq
Hi, I'm familiar with the %s/patt//n trick to count the # of patterns in the file. I would like to ask how to count the # of paragraphs in a file. My question has 2 flavors: 1. Count free text paragraphs separated by empty lines 2. Count structured paragraphs that have a prefix and suffix

Re: how to insert two lines at the same place in many files

2010-05-26 Thread yosi izaq
I have over 300 files that need the following done to them: at line X insert the following two lines: xxx [foo] xxx ack where [foo] is the fully qualified path the the file with the /'s converted to .'s I usually keep vim out of such tasks. Why not regular linux commands?- Something

Re: ANN: Vim for Outlook

2010-05-10 Thread yosi izaq
inline, 10x, Yosi Please update to OutlookVim 3.0. done Two things: 1.  After opening the email in Vim, please provide the output from: :au outlook You can select this with your mouse and hit CTRL-Y, then paste it into this email.  It should look something like this: :au

Re: ANN: Vim for Outlook

2010-05-09 Thread yosi izaq
This plugin sounds very useful. I have outlook 2k7 and have followed the install instructions. I have added the vim macro and quick access button. Clicking it opens a vim session for editing the email. However saving the changes (:w) doesn't update the email. Any idea what's wrong? thx, Yosi

Can't save file due to CONVERSION ERROR in line...

2010-03-25 Thread Yosi Izaq
Hi, This happens to me when I copy paste text from my browser. It's driving me crazy :) How can I turn this off? TIA, Yosi -- 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

How to exclude scan of included files when pressing ctrl+p

2010-01-25 Thread Yosi Izaq
Hi, I know about the ctrl+x+? combination. So I can complete from only dictionary or only include files etc. However, I want to complete from all sources minus the include files (which take forever and not required when I'm not coding). Can someone please suggest how to get it done? TIA, Yosi

Re: How to exclude scan of included files when pressing ctrl+p

2010-01-25 Thread yosi izaq
On Mon, Jan 25, 2010 at 1:49 PM, Tim Chase v...@tim.thechases.com wrote: I know about the ctrl+x+? combination. So I can complete from only dictionary or only include files etc. However, I want to complete from all sources minus the include files (which take forever and not required when I'm

Re: How to force windows vim to load appropriate vimrc?

2010-01-20 Thread yosi izaq
You are both right. I opted to adapt my .vimrc to linux/windows/cygwin by wrapping specific OS settings in appropriate has() block. Thank you for the quick help. This group rocks. Yosi. -- You received this message from the vim_use maillist. For more information, visit

How to force windows vim to load appropriate vimrc?

2010-01-19 Thread Yosi Izaq
Hi, I have two gvim 7.2 installs on my machine. One for cygwin and another for windows. I recently noticed that the windows gvim is actually loading the cygwin ~/.vimrc file instead of the Program file/vim/ _vimrc file. How come? and how can I fix that? TIA, Yosi -- You received this message

Re: Folding question

2009-10-08 Thread yosi izaq
On Thu, Oct 8, 2009 at 2:27 PM, Paul wrote: I would like to apply the most simple directive to fold all the file so that each item (-) would be closed. set foldmethod=indent ? Doesn't get the job done. The bullets are indented but I'm too lazy to indent the text so the file looks like: -

Re: Folding question

2009-10-08 Thread yosi izaq
On Thu, Oct 8, 2009 at 4:30 PM, Brett Stahlman wrote: On Oct 8, 8:31 am, yosi izaq izaq...@gmail.com wrote: On Thu, Oct 8, 2009 at 2:27 PM, Paul  wrote: I would like to apply the most simple directive to fold all the file so that each item (-) would be closed. set foldmethod=indent

Re: Folding question

2009-10-08 Thread yosi izaq
On Thu, Oct 8, 2009 at 5:44 PM, Brett Stahlman wrote: None of the lines start with `contains'. The lines were broken automatically. The simplest way to test would be to paste it into a file (e.g., /tmp/todo_syntax.vim) and source the file from within the file containing your TODO items. E.g.,

Re: Use VIM to perform text manipulation on file (like sed/awk)

2009-08-31 Thread yosi izaq
On Thu, Aug 27, 2009 at 2:55 PM, Christian Brabandt wrote: ... I haven't tested it thoroughly, but this sed script seems to work for me: , | #!/bin/sh | | | if [ $1 = -c ]; then |     COMMENT='yes'; |     shift; | else |     COMMENT='no'; | fi | | if [ $COMMENT = yes ]; then |  

Re: Use VIM to perform text manipulation on file (like sed/awk)

2009-08-31 Thread yosi izaq
Thank you very much Christian. That was a very detailed and helpful answer! --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---

Re: Use VIM to perform text manipulation on file (like sed/awk)

2009-08-26 Thread yosi izaq
On Tue, Aug 25, 2009 at 7:33 PM, Ben Fritz wrote: It is possible to save the operations that you would do by hand to a file, and just run them exactly as if typed. No knowledge of vimscript required. You could make it even easier if you first run Vim interactively with - w to record

Re: File format, unix vs. dos question

2009-08-09 Thread yosi izaq
Thank you Bill and Andy for the helpful Answers! Yosi --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---

Re: Tags paths problem

2009-06-17 Thread yosi izaq
On Mon, Jun 15, 2009 at 5:49 PM, Alessandro Antonello wrote: Sorry! The command line to the ctags tool is:   ctags -f out_put/path/file --c++-kinds=+p --fields=+iaS --extra=+q   --tag-relative=yes sources/path/* I left a '%' sign in the preceding message in the middle of the command line.

Re: how to perform action on all modified buffers

2009-06-13 Thread yosi izaq
On Sat, Jun 13, 2009 at 10:38 AM, Tony Mechelynck wrote: Always watch for typos! :budfo (from buddy foobar?) is indeed not an editor command. :bufdo (from buffer do) is. My Achilles heel. Sorry 4 that and thank you for catching this! Yosi

Re: how to perform action on all modified buffers

2009-06-11 Thread yosi izaq
Thank you Christian and all for your patience and your helpful answers. I love VIM, but now that I know how kind and helpful this group is I love it even more :D Yosi --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information,

Re: how to perform action on all modified buffers

2009-06-10 Thread yosi izaq
On Wed, Jun 10, 2009 at 12:20 AM, Christian Brabandt wrote: 1. How do I put all modified buffers to archive?- Ultimately I'd like to either map the command or add to a GUI menu. Here we go: set hidden let archive=[] bufdo if modified |  call add(archive, shellescape(expand(%),1))|

Re: how to perform action on all modified buffers

2009-06-09 Thread yosi izaq
On Sun, Jun 7, 2009 at 3:28 PM, WL wrote: ... Seeing as this is not trivial (well at least not for me) I'd like to ask specific related questions. 1. How do I put all modified buffers to archive?- Ultimately I'd like to either map the command or add to a GUI menu. 2. How do check in all

Re: vimgrep: how to get rid of E303

2009-04-13 Thread yosi izaq
:help E303 says you may want to change the 'directory' option to avoid this error. What does :verbose set directory? tell you? Check :help 'directory' for the format of this option and a list of potential gotchas, and make sure you have write privileges in the directories listed. :verbose

Re: GVIM Vista cygwin issue

2009-04-07 Thread yosi izaq
On Tue, Apr 7, 2009 at 2:00 AM, Matt Wozniski wrote: Search the cygwin list archives for errors of this sort.  Usually means you have some other software that's interfering with cygwin (see the OLOCA for BLODA). Yes. That helped. I uninstalled the mcafee antivirus and now the original

Re: Vi editor for answering emails?

2009-03-03 Thread yosi izaq
Hi, I've followed up on the it's all text addon to firefox. It works well for me. One thing I'd like to improve though. My VIM is heavily configured towards source code editing so it takes a lot of time to load. Is there a quick way to force VIM to load with a minimal feature set with the aim of

Re: Vi editor for answering emails?

2009-03-03 Thread yosi izaq
You can specify a .vimrc with the -u command line option and a .gvimrc with the -U command line option. Read :help -u and :help -U HTH, Dennis Benzinger Works like a charm. Thanks! --~--~-~--~~~---~--~~ You received this message from the vim_use maillist.

Re: Profiling VIM and/or displaying current action

2009-02-23 Thread yosi izaq
On Sun, Feb 22, 2009 at 9:36 PM, Dominique Pelle wrote: If it hangs, you can also attach with gdb and look at the stack: $ gdb vim PID (gdb) bt Doesn't work on my system for some reason. I get: [yi...@yizaq-lnx:Mon Feb 23:~]$ which vim /usr/local/bin/vim [yi...@yizaq-lnx:Mon Feb 23:~]$ sudo

Re: Strange result of reading from shell

2009-01-26 Thread yosi izaq
On Fri, Jan 16, 2009 at 1:19 AM, Tony Mechelynck wrote: What about :r !ls --color=no ? This one works. Thanks! Yosi --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit

Re: Strange result of reading from shell

2009-01-26 Thread yosi izaq
On Fri, Jan 16, 2009 at 1:39 AM, Gary Johnson wrote: To verify that you are using an alias, you can execute (at a shell prompt): alias ls I think you'll see something like this: ls='ls --color=always' If you can find where that alias is defined--probably in your ~/.bashrc or

Re: Strange result of reading from shell

2009-01-26 Thread yosi izaq
On Fri, Jan 16, 2009 at 10:19 AM, Tony Mechelynck wrote: Another possibility is the environment variable $LS_OPTIONS. If it is set, find out where (probably by one or more of your startup scripts -- the manpage for your shell will tell you wwhich scripts it runs at startup) and replace (in

Re: Strange result of reading from shell

2009-01-15 Thread yosi izaq
Hi, I'm using gvim launched from an linux xterm. I want to work with all the files in the current directory so I do :r! ls the result is full of strange characters that get in the way of editing the file. I get something like (ignore the line numbers): 2 ^[[00mtotal 184 3

Re: vim and bash

2008-12-14 Thread yosi izaq
Following your responses I was able to make VIM recognize my bash aliases - a huge time saver. Thank you guys! Yosi On Fri, Dec 12, 2008 at 5:12 AM, Matt Wozniski m...@drexel.edu wrote: On Thu, Dec 11, 2008 at 11:40 AM, Gary Johnson wrote: On 2008-12-11, yosi izaq wrote: On Wed, Dec 10

Re: vim and bash

2008-12-11 Thread yosi izaq
On Wed, Dec 10, 2008 at 8:06 PM, Gary Johnson [EMAIL PROTECTED]wrote: On 2008-12-10, yosi izaq wrote: One last Q, Is it possible for VIM to recognize my aliases, such as I have in my .aliases for example?- (in bash I simply source them of course) Vim doesn't know anything about how

Re: vim and bash

2008-12-10 Thread yosi izaq
On Sun, Dec 7, 2008 at 3:40 PM, Ben Schmidt [EMAIL PROTECTED]wrote: yosi izaq wrote: On Wed, Dec 3, 2008 at 3:06 PM, Nicolas Aggelidis [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: thank you Cory! the verbose set shell, saved my day! So how do I explicitly set

Re: vim and bash

2008-12-07 Thread yosi izaq
On Wed, Dec 3, 2008 at 3:06 PM, Nicolas Aggelidis [EMAIL PROTECTED]wrote: thank you Cory! the verbose set shell, saved my day! So how do I explicitly set the VIM shell variable? 10x, Yosi --~--~-~--~~~---~--~~ You received this message from the vim_use

Re: Basic usage: how to execute commands from history

2008-12-07 Thread yosi izaq
On Sun, Dec 7, 2008 at 12:47 PM, John Beckett [EMAIL PROTECTED]wrote: WL wrote: This is what I currently know about command history: :hist prints the history and @: executes last command (: is last cmd buffer). What I'm missing is how to execute a given previous command from the

Re: How to determine current font in use

2008-11-30 Thread yosi izaq
Thank You! Yosi --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---

Re: How to list all occurrence of a identifier

2008-11-26 Thread yosi izaq
As has just been pointed out in another thread, bottom-posting is preferred on this mailing list, so it'd be good if you could do that in your replies (like I have: write your reply under the text you are replying to, trimming the text so only the relevant parts are left). Sure. Is this

Re: How to list all occurrence of a identifier

2008-11-25 Thread yosi izaq
install hassle) but get the following error: c:\views\my_project_path\ mkid *.[chy] mkid: can't get working directory: Permission denied Yosi On Tue, Nov 25, 2008 at 3:12 PM, yosi izaq [EMAIL PROTECTED] wrote: It works, I use it daily. I'm not sure what you mean by didn't seem to be able to cope

Re: How to list all occurrence of a identifier

2008-11-25 Thread yosi izaq
On Tue, Nov 25, 2008 at 3:35 PM, yosi izaq [EMAIL PROTECTED] wrote: ok. Please ignore my previous response. The cscope query now works perfectly and lists matches to quickfix. As for the GNU ID Utils, I've started to read several online documents but couldn't find a basic mkid scan command for C

Re: Select 'v' Issue

2008-11-23 Thread yosi izaq
Change color scheme? For convenient color scheme rotation see in vim tips the tip # 955. Based on this I've added following to my .vimrc: function! SetNextColor(forward) if exists('g:colors_name') let colstr = 'default elflord peachpuff desert256 breeze morning' let colstr .= '

Re: Detect platform

2008-11-16 Thread yosi izaq
Great tip! I have added this section to my .vimrc on cygwin: if has('gui') we use has('gui') rather than has('gui_running') here so it will work even if we start Console Vim first then run :gui manually (which is only possible on Unix) if has('gui_gtk2')

Re: location-list

2008-11-06 Thread yosi izaq
, 2008 at 12:46 PM, Tim Chase [EMAIL PROTECTED] wrote: yosi izaq wrote: Very basic question. How can I read the help documentation for the location list? for the big picture, :help quickfix.txt to jump straight to the location-list stuff in that document: :help location-list

Re: Mapping keys

2008-11-06 Thread yosi izaq
)? 'w!' : 'w1') endif (I also tried your version that is spread to more lines, it doesn't work as well). On Wed, Nov 5, 2008 at 9:23 PM, Tony Mechelynck [EMAIL PROTECTED] wrote: On 05/11/08 19:27, yosi izaq wrote: I often make the mistake of typing w1 instead of w!. Can you please suggest how

Re: Mapping keys

2008-11-05 Thread yosi izaq
I often make the mistake of typing w1 instead of w!. Can you please suggest how to map w1 to w!? TIA On Wed, Nov 5, 2008 at 7:19 PM, Tony Mechelynck [EMAIL PROTECTED] wrote: On 05/11/08 17:32, Christian Brabandt wrote: Hi Robert! On Wed, 05 Nov 2008, Robert wrote: Frequently when I go to