Re: insert mode mapping to move to a column

2013-06-05 Thread sinbad
On Tuesday, June 4, 2013 5:20:48 PM UTC+5:30, Willy Gfn wrote: May I suggest using NORMAL mode to perform moves ? In this case : kwj is just what you want. No fancy escapes, no variable toggling, etc... At least, if you use this move *REALLY* often, consider using a mapping

Re: insert mode mapping to move to a column

2013-06-04 Thread Willy Gfn
Salman Halim wrote: On Mon, Jun 3, 2013 at 10:38 AM, Ben Fritz fritzophre...@gmail.com wrote: On Monday, June 3, 2013 1:31:08 AM UTC-5, sinbad wrote: On Thursday, May 30, 2013 10:59:52 AM UTC+5:30, sinbad wrote: set ve=all is little annoying to be set all the time, at least i'm

Re: insert mode mapping to move to a column

2013-06-03 Thread sinbad
On Thursday, May 30, 2013 10:59:52 AM UTC+5:30, sinbad wrote: On Wednesday, May 29, 2013 8:31:09 PM UTC+5:30, Ben Fritz wrote: I think (if as Christian suggests you have 'virtualedit' set to all) this will work: UpC-RightDown This works, thanks Ben and toothpik. set ve=all is little

Re: insert mode mapping to move to a column

2013-06-03 Thread Ben Fritz
On Monday, June 3, 2013 1:31:08 AM UTC-5, sinbad wrote: On Thursday, May 30, 2013 10:59:52 AM UTC+5:30, sinbad wrote: On Wednesday, May 29, 2013 8:31:09 PM UTC+5:30, Ben Fritz wrote: I think (if as Christian suggests you have 'virtualedit' set to all) this will work: UpC-RightDown

Re: insert mode mapping to move to a column

2013-06-03 Thread Salman Halim
On Mon, Jun 3, 2013 at 10:38 AM, Ben Fritz fritzophre...@gmail.com wrote: On Monday, June 3, 2013 1:31:08 AM UTC-5, sinbad wrote: On Thursday, May 30, 2013 10:59:52 AM UTC+5:30, sinbad wrote: set ve=all is little annoying to be set all the time, at least i'm not use to it. how can i

Re: insert mode mapping to move to a column

2013-05-29 Thread Christian Brabandt
On Wed, May 29, 2013 11:15, sinbad wrote: how to move to a column in the current line, to the column same as the next word from the current position in the above line. This is the best i could explain. example. 123456789 move to here i* * - do something here such that i automatically

Re: insert mode mapping to move to a column

2013-05-29 Thread tooth pik
On Wed, May 29, 2013 at 02:15:40AM -0700, sinbad wrote: how to move to a column in the current line, to the column same as the next word from the current position in the above line. This is the best i could explain. example. 123456789 move to here i* * - do something here such that i

Re: insert mode mapping to move to a column

2013-05-29 Thread sinbad
Then you can type from insert mode c-o6| and continue inserting in column 6 except that i'll have to count the column number everytime. i want to be able to do this automatically. -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text

Re: insert mode mapping to move to a column

2013-05-29 Thread sinbad
I believe you are looking for CTRL-Right (the right cursor arrow no this isn't working. -- -- 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

Re: insert mode mapping to move to a column

2013-05-29 Thread Ben Fritz
On Wednesday, May 29, 2013 6:20:36 AM UTC-5, sinbad wrote: I believe you are looking for CTRL-Right (the right cursor arrow no this isn't working. This isn't working to me could mean that you tried it and it went to the next word in the CURRENT line, which is what the command SHOULD do. If

Re: insert mode mapping to move to a column

2013-05-29 Thread sinbad
On Wednesday, May 29, 2013 8:31:09 PM UTC+5:30, Ben Fritz wrote: I think (if as Christian suggests you have 'virtualedit' set to all) this will work: UpC-RightDown This works, thanks Ben and toothpik. -- -- You received this message from the vim_use maillist. Do not top-post! Type your

Re: insert mode map multiple spaces

2012-07-25 Thread sinbad
On Jul 21, 1:21 am, sinbad sinbad.sin...@gmail.com wrote: On Jul 19, 3:11 am, Christian Brabandt cbli...@256bit.org wrote: can we perform some action inside the map function. i have this  normal /;CR inside the Map(), it doesn't seem to be working, it just prints '0', can't map functions do

Re: insert mode map multiple spaces

2012-07-25 Thread Christian Brabandt
On Wed, July 25, 2012 08:12, sinbad wrote: On Jul 21, 1:21 am, sinbad sinbad.sin...@gmail.com wrote: can we perform some action inside the map function. i have this  normal /;CR inside the Map(), it doesn't seem to be working, it just prints '0', can't map functions do that ? is it possible

Re: insert mode map multiple spaces

2012-07-20 Thread sinbad
On Jul 19, 3:11 am, Christian Brabandt cbli...@256bit.org wrote: On Thu, July 19, 2012 08:20, sinbad wrote: with the following insert mode mapping, if i type testspaceoe, i'll get double space between test  one, can i change the mapping to always have atmost one space inoremap oe

Re: insert mode map multiple spaces

2012-07-19 Thread Gary Johnson
On 2012-07-18, sinbad wrote: with the following insert mode mapping, if i type testspaceoe, i'll get double space between test one, can i change the mapping to always have atmost one space inoremap oe spaceonespace Your mapping is doing exactly what you told it to do. Isn't the following

Re: insert mode map multiple spaces

2012-07-19 Thread Christian Brabandt
On Thu, July 19, 2012 08:20, sinbad wrote: with the following insert mode mapping, if i type testspaceoe, i'll get double space between test one, can i change the mapping to always have atmost one space inoremap oe spaceonespace Use an expression mapping: fu! Map(arg) return (col('.')

Re: insert mode map multiple spaces

2012-07-19 Thread sinbad
On Thursday, July 19, 2012 12:41:31 PM UTC+5:30, Christian Brabandt wrote: On Thu, July 19, 2012 08:20, sinbad wrote: gt; with the following insert mode mapping, if i type quot;testlt;spacegt;oequot;, i#39;ll gt; get gt; double space between quot;test onequot;, can i change the mapping to

Re: insert mode mappings

2012-05-31 Thread Gary Johnson
On 2012-05-31, sinbad wrote: hi, can the insert mode mappings be made available for the text entered during searches / and ?. and also for the text entered as part of input() fn ? Input mode mappings do not apply in those contexts. Use command mode mappings instead. Regards, Gary -- You

Re: insert mode mappings

2012-05-31 Thread Jürgen Krämer
Hi, sinbad wrote: can the insert mode mappings be made available for the text entered during searches / and ?. use :map! and :noremap! instead of :imap and :inoremap if you want to use a mapping in insert and command-line mode. Note that this also makes the mapping available after a :.

Re: insert mode mappings

2012-05-31 Thread Jürgen Krämer
Hi, Jürgen Krämer wrote: sinbad wrote: can the insert mode mappings be made available for the text entered during searches / and ?. use :map! and :noremap! instead of :imap and :inoremap if you want to use a mapping in insert and command-line mode. Note that this also makes the

Re: Insert mode paste problems in GUI

2011-05-11 Thread Ben Schmidt
Now for some solutions: a) useC-R+ to paste: this works but lines of formatted text usually ends up being a complete mess afterwards (the indentation changes) b) useC-RC-O+ to paste: this fixes 1 but not 2, formatting is ok though c) useC-O:set pasteCRC-R+C-O:set nopasteCR this seems to fix

Re: Insert mode paste problems in GUI

2011-05-11 Thread bjorn.winckler
On May 11, 2:05 pm, Ben Schmidt wrote: Now for some solutions: a) useC-R+ to paste:  this works but lines of formatted text usually ends up being a complete mess afterwards (the indentation changes) b) useC-RC-O+ to paste:  this fixes 1 but not 2, formatting is ok though c)

Re: Insert mode paste problems in GUI

2011-05-11 Thread Bram Moolenaar
Björn Winckler wrote: I have been notified of two insert mode paste problems in MacVim which I assume also apply to all other GUIs. When I say paste, I mean paste using the menu Edit-Paste, or the toolbar. 1. In block mode, assume the + register contains HI and your buffer looks like

Re: Insert mode paste problems in GUI

2011-05-11 Thread Ben Schmidt
In theory, yes. However, it seems Vim always mucks up the formatting when pasting. For me it almost always indents every line one extra shift width for each new line resulting in a staircase of lines. Not for me. If I have text without leading whitespace on the clipboard and paste it at an

Re: INSERT mode

2010-08-14 Thread r48gx
Just put this in my .vimrc ro...@novaprospect:~$ more .vimrc inoremap left escleft inoremap right escright inoremap up escup inoremap down escdown ro...@novaprospect:~$ It does exactly what I want now. It exits insert mode when I hit a cursor key. Thank you so much ! I was about to remove vim

Re: INSERT mode

2010-08-14 Thread bill lam
Does it moves an extra character position to the left? Птн, 13 Авг 2010, r48gx писал(а): Just put this in my .vimrc ro...@novaprospect:~$ more .vimrc inoremap left escleft inoremap right escright inoremap up escup inoremap down escdown ro...@novaprospect:~$ It does exactly what I want

Re: INSERT mode

2010-08-14 Thread robin clark
no just seems to go out of insert mmode when you hit an arrow key On 14 August 2010 07:43, bill lam cbill@gmail.com wrote: Does it moves an extra character position to the left? Птн, 13 Авг 2010, r48gx писал(а): Just put this in my .vimrc ro...@novaprospect:~$ more .vimrc inoremap left

Re: INSERT mode

2010-08-14 Thread bill lam
(moderators, sorry for top-posting in my previous message) Сбт, 14 Авг 2010, robin clark писал(а): inoremap left escleft inoremap right escright Hitting esc in insert mode will go to command mode with cursor move one character backwards except in the begining of a line.[1] [1] vi Tutorial

Re: INSERT mode

2010-08-13 Thread Tim Chase
On 08/13/10 10:45, r48gx wrote: For years I have been using vi, and when you move the cursor in vim, it stays in insert mode. Is there anyway vim can be told to leave insert mode when a cursor jey is being pressed ? I suspect it may be a 'timeoutlen'/'ttimeoutlen' issue: :help 'tm' which

Re: INSERT mode

2010-08-13 Thread bill lam
Птн, 13 Авг 2010, Tim Chase писал(а): :inoremap left escleft :inoremap right escright ... to force the behavior you want. I guess the old vi does not recognise arrow keys in input mode, pressing arrow keys will just generate the sequences ^[OC etc. The OP might want a imap to map

Re: Insert mode completion for sentences

2009-02-25 Thread Tuomas Pyyhtiä
On Wed, 25 Feb 2009 04:46:45 +0200, Nazri Ramliy ayieh...@gmail.com wrote: On Wed, Feb 25, 2009 at 2:59 AM, Tuomas Pyyhtiä tuomas.pyyh...@iki.fi wrote: Any pointers to a script with an auto-completion feature that finishes those whole sentences as well, or any other suggestions how I get

Re: Insert mode completion for sentences

2009-02-25 Thread Nazri Ramliy
On Thu, Feb 26, 2009 at 12:19 AM, Tuomas Pyyhtiä tuomas.pyyh...@iki.fi wrote: Thanks for the suggestion. Although abbreviations are great, they don't get the job done here as I would have to define and memorize 1 abbreviations and that seems highly impractical. It seems to be that I am not

Re: Insert mode completion for sentences

2009-02-25 Thread Ben Fritz
On Feb 24, 12:59 pm, Tuomas Pyyhtiä tuomas.pyyh...@iki.fi wrote: I have studied and played around with the dictionary functionality and insert mode completion but didn't find out how to solve this: In a file I've got ~1 lines of short sentences (2-6 words) which I need to manually

Re: Insert mode completion for sentences

2009-02-24 Thread Nazri Ramliy
On Wed, Feb 25, 2009 at 2:59 AM, Tuomas Pyyhtiä tuomas.pyyh...@iki.fi wrote: Any pointers to a script with an auto-completion feature that finishes those whole sentences as well, or any other suggestions how I get this done? Thanks! Use abbreviations. he :abbreviations example:

Re: Insert Mode Mappings on a Mac

2008-12-20 Thread Andrew Long
On 20 Dec 2008, at 04:07, Tony Mechelynck wrote: snip/ IIUC, Ctrl-Left and Ctrl-Right to move left/right by words are among the default key bindings of Vim. If they don't work when you hit them, not even after loading Vim with -N -u NONE (without quotes) on its (shell) command-line,

Re: Insert Mode Mappings on a Mac

2008-12-20 Thread sc
On Saturday 20 December 2008 3:49 am, Tony Mechelynck wrote: On 20/12/08 10:03, Andrew Long wrote: On 20 Dec 2008, at 04:07, Tony Mechelynck wrote: snip/ IIUC, Ctrl-Left and Ctrl-Right to move left/right by words are among the default key bindings of Vim. If they don't work when

Re: Insert Mode Mappings on a Mac

2008-12-19 Thread Marc Weber
Hi Leandro, I'm not having success to make these two key mappings to work: noremap silent C-, Esc:call cursor(line('.'), 1)CRi noremap silent C-. Esc:call cursor(line('.'), col('$'))CRi What are you trying to do? You're not using *i*noremap. Thus those mappings will only work in normal

Re: Insert Mode Mappings on a Mac

2008-12-19 Thread Tony Mechelynck
On 20/12/08 03:30, Leandro Camargo wrote: On Sat, Dec 20, 2008 at 12:17 AM, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 20/12/08 00:26, Leandro N. Camargo wrote: I'm not having success to make these two key mappings to work: noremapsilent C-, Esc:call cursor(line('.'), 1)CRi

Re: Insert Mode Mappings on a Mac

2008-12-19 Thread Tony Mechelynck
On 20/12/08 04:22, Leandro Camargo wrote: Yeah...following a simpler idea, it'd become something like these: imapC-Left Escbi imapC-Right Escwi imapC-S-Left EscA imapC-S-Right EscI On Sat, Dec 20, 2008 at 1:02 AM, Marc Webermarco-owe...@gmx.de wrote: You still haven't corrected