Repeat entry into insert mode?

2009-12-02 Thread Chris Suter
Say I've entered insert mode by typing 4s -- removing four characters from the current cursor position and leaving me in insert mode. Is there a built-in means of repeating this? Use case: I have one line of text like: private EntryReader xmlEntryReader; I want to add 3 new entries with the

Re: Repeat entry into insert mode?

2009-12-02 Thread Chris Suter
That would indeed work for this case, but this was just one example. In general I would still like to repeat insert mode entry. Thanks for the idea! -Chris On Wed, Dec 2, 2009 at 2:14 PM, meino.cra...@gmx.de wrote: Chris Suter cgs1...@gmail.com [09-12-02 19:56]: Say I've entered insert mode

Re: Repeat entry into insert mode?

2009-12-02 Thread Chris Suter
On Wed, Dec 2, 2009 at 6:02 PM, John Beckett johnb.beck...@gmail.comwrote: Chris Suter wrote: Say I've entered insert mode by typing 4s -- removing four characters from the current cursor position and leaving me in insert mode. Is there a built-in means of repeating this? I'm sure you

Re: name of this file

2009-10-29 Thread Chris Suter
On Thu, Oct 29, 2009 at 6:43 PM, JuanPablo jabar...@gmail.com wrote: yes, :make is for compile. but my real question is a vim function for get the name of file. On Thu, Oct 29, 2009 at 7:38 PM, kbirkl...@gmail.com wrote: Just do a :make instead Sent on the Now Network™ from my

Re: imap with movement keys brakes repeat . command.

2009-10-18 Thread Chris Suter
- Original message - Hello there, I have a plug-in that relies on imappings. When ... Could be something weird about your terminal's left arrow control sequence (what vim sees when you type left). Try instead :inoremap ( ()ESCi which will tell vim to leave insert mode -- leaving the cursor over

Re: imap with movement keys brakes repeat . command.

2009-10-18 Thread Chris Suter
On Sun, Oct 18, 2009 at 8:12 PM, Israel Chauca F. israelcha...@gmail.comwrote: On Oct 18, 3:13 pm, Chris Suter cgs1...@gmail.com wrote: Could be something weird about your terminal's left arrow control sequence (what vim sees when you type left). Try instead :inoremap ( ()ESCi which

Re: Count and write the number of occurences

2009-10-12 Thread Chris Suter
On Mon, Oct 12, 2009 at 4:22 PM, Jeri Raye jeri.r...@gmail.com wrote: Hi, I want to check several new-articles on the occurences of words Therefore the two questions: 1) How to let vim place a carriage return after each word in an news-article? And 2) If you have a text like this AAA

Re: Different buffer list for different tabs?

2009-10-11 Thread Chris Suter
On Sun, Oct 11, 2009 at 6:32 PM, bora...@gmail.com wrote: Saluton :) Salute :) b...@gmail.com skribis: What I would like to do is to work on different projects in the same Vim program. As far as I know a tab page holds a group of windows, not a buffer list but I am wondering if

Re: Yankring and remapping of @q

2009-10-10 Thread Chris Suter
- Original message - Hi, I often use a combo of qq (macro recording into register ... This may not address the latter problem, but to avoid losing the q register by accidently hitting two qs, it might be worthwhile to know that after having executed a macro by, say, @q, the sequence @@ will

Re: mapping alt-keys

2009-10-07 Thread Chris Suter
On Wed, Oct 7, 2009 at 5:58 PM, Hoss todd.fr...@gmail.com wrote: I am having trouble mapping my alt keys. so if I use this mapping M-g :echo hihi I get nothing when I hold down alt, and press g in normal mode. I have read :map-alt-keys in the documentation, and it suggests there's alot

Re: mapping alt-keys

2009-10-07 Thread Chris Suter
On Wed, Oct 7, 2009 at 6:50 PM, Hoss todd.fr...@gmail.com wrote: in insert mode, try typing C-v first, then M-g. This should reflect the exact key code that vim received. Then you can just copy whatever vim displays into your map command directly (when I do this in

Re: Deleting all but selected on a line

2008-12-06 Thread Chris Suter
if you have the text selected in visual mode already, you could simply do dVP. this will delete the selected text, putting it in the register, then select the whole line, and replace it with the contents of the register. On Thu, Dec 4, 2008 at 9:06 AM, fritzophrenic [EMAIL PROTECTED]wrote:

Re: How to copy X text

2008-12-02 Thread Chris Suter
this says, into the p register, (y)ank (a) double-quoted text object. should have said this says, into the p register, (y)ank (i)nside double-quoted text object. On Tue, Dec 2, 2008 at 1:51 PM, Chris Suter [EMAIL PROTECTED] wrote: you could also, from anywhere inside the double quotes, type

Re: problem with ftp remote file access under windows

2008-11-28 Thread Chris Suter
i think it's trying to open (create) a swap file (where one does not exist) on the remote host, and probably gets denied. try set directory = SOME_LOCAL_DIRECTORY specifying a folder on your local machine and it will create the swap file there. i don't care for this option, personally, but it

Re: clear screen on quit on filetype

2008-11-18 Thread Chris Suter
create a wrapper script for /usr/bin/vim containing the following: #!/bin/bash /usr/bin/vim $1 if [[ -f /tmp/was_editing_certain_type_of_file ]] then rm /tmp/was_editing_certain_type_of_file clear fi then, in your ~/.vimrc, add the following (assume you want to do this for anything

Re: Open file relative to current file's directory?

2008-11-17 Thread Chris Suter
The abrasive tone of your reply is uncalled for. I was sharing something I've found extremely useful in my (frankly, very short) time using vim. If I understand correctly, then the initiator of this thread also found it useful and I'm quite pleased. Thanks, however, for the C-v tip -- i didn't

Re: Open file relative to current file's directory?

2008-11-17 Thread Chris Suter
Good call! Wasn't thinking it through that much when i wrote it... On Mon, Nov 17, 2008 at 4:07 AM, Ben Schmidt [EMAIL PROTECTED]wrote: Chris Suter wrote: you could modify it to the following to return to the normal command mode (although cmdwin mode is quite nice, imo, once you're

Re: Open file relative to current file's directory?

2008-11-14 Thread Chris Suter
you could do a mapping such as the following: :cmap %/ ^R%^FF/lC the control characters ^R and ^F can be entered as digraphs (see :help digraphs, :help CTRL-k, and :digraphs) using these keystrokes: ^R - C-kD2 ^F - C-kAK the mapping will cause the following to occur when you enter %/ in the Ex

Re: Open file relative to current file's directory?

2008-11-14 Thread Chris Suter
also, check out VTreeExplorer -- I would quit using computers if I couldn't have this plugin. http://www.vim.org/scripts/script.php?script_id=184 On Fri, Nov 14, 2008 at 5:16 PM, Chris Suter [EMAIL PROTECTED] wrote: you could do a mapping such as the following: :cmap %/ ^R%^FF/lC

Re: determining and printing fraction of an ascii file - continue

2008-11-10 Thread Chris Suter
I believe the line number and column number are listed in the very bottom-left corner of the interface (or individiual window, if in split mode) by default. The C-g command then just shows you about where that value lies in the range of the whole file. On Mon, Nov 10, 2008 at 4:52 PM, Tim Chase

Re: Newbie question....

2008-11-07 Thread Chris Suter
I use split windows constantly and have gotten very accustomed to hitting C-w. For this reason, I've added the following to my .vimrc nnoremap C-wyy +yy nnoremap C-wy +y vnoremap C-wy +y nnoremap C-wdd +dd nnoremap C-wd +d vnoremap C-wd +d nnoremap C-wp +p vnoremap C-wp +p nnoremap C-wP +P

Re: Newbie question....

2008-11-07 Thread Chris Suter
PROTECTED] wrote: On Nov 7, 12:42 pm, Chris Suter [EMAIL PROTECTED] wrote: I use split windows constantly and have gotten very accustomed to hitting C-w. For this reason, I've added the following to my .vimrc nnoremap C-wyy +yy nnoremap C-wy +y vnoremap C-wy +y nnoremap C-wdd +dd

Re: Could someone please tell me how to install vim on a WindowsXP machine

2008-11-06 Thread Chris Suter
Have you tried GVim? I don't care for running vim not in a terminal, personally, but if you're stuck on an XP box, it should at least give you a proper window and some real font capabilities -- not the god-awful windows 80x25 cmd line. check here http://www.vim.org/download.php#pc -- it should

slowness with gnu screen

2008-11-06 Thread Chris Suter
I am using vim (7.1) from a GNU Screen session (4.00.03) from within gnome-terminal on Ubuntu 8.04. I regularly use screen with several active windows, and I've found that after leaving a session active awhile (for how long, i'm not sure) vim startup seems to take *forever* (upwards of 30