RE: Undoing changes after saving file

2009-11-16 Thread Christian Brabandt
On Sat, November 14, 2009 10:47 pm, John Beckett wrote: > Tim Chase wrote: >>:%d >>:r % >>:1d >> >> which (1) deletes all the content, (2) reads in the content >> from disk below the one blank line remaining, and then (3) >> deletes the spurious blank line. >> >> The above could be wra

Re: Undoing changes after saving file

2009-11-16 Thread Efraim Yawitz
On Mon, Nov 16, 2009 at 11:51 AM, Christian Brabandt wrote: > > > You could possibly also try out the persistent undo feature. But for > this you need to patch the vim source and compile yourself. See > http://groups.google.com/group/vim_dev/browse_frm/thread/b23d563bffcec9b5 > for the thread at v

How to map

2009-11-16 Thread Simson Liu
Hi all, I need map , but the following command: map :echo "abc" do nothing for me. Is it possible to map ? Thanks in advance, Liu --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org

Re: Display custom reference bar on top of window

2009-11-16 Thread Tim Chase
> I would like to set up a vim environment for basic HTML edit to be used > by someone else. For this I'd like to set up a quick reference bar to > be shown on top of the window with things like " | />" and so on. Can this be done? My first thought is just to open your help in a new window.

Re: Display custom reference bar on top of window

2009-11-16 Thread Christian Brabandt
On Sun, November 15, 2009 9:19 pm, Matteo Riva wrote: > I would like to set up a vim environment for basic HTML edit to be used > by someone else. For this I'd like to set up a quick reference bar to > be shown on top of the window with things like " | />" and so on. Can this be done? Are yo

Re: How to map

2009-11-16 Thread Tony Mechelynck
On 16/11/09 13:59, Simson Liu wrote: > Hi all, > I need map , but the following command: > map :echo "abc" > do nothing for me. > Is it possible to map ? > Thanks in advance, > Liu It is not guaranteed, and it may depend on your OS: on my present Gnome desktop, the Alt-Esc key combo is not pass

Re: How to get the screen of the previous command that was executed?

2009-11-16 Thread Joan Miquel Torres Rigo
2009/11/16 Peng Yu [...] > > > I think he is talking about: when the command returns and he's back in > > > vim, how to see the command output > > Yes. This is what I mean. > I have a similar problem, but I partially solve it by using command filtering. In my case, what I want to do sometimes i

Re: Display custom reference bar on top of window

2009-11-16 Thread Tim Chase
Christian Brabandt wrote: >> by someone else. For this I'd like to set up a quick reference bar to >> be shown on top of the window with things like " | > />" and so on. Can this be done? > > Are you using Tabs? If not, you could make the tabline option display > your 'help' A simultaneously

Re: Vim Latex Citation Completion

2009-11-16 Thread Mahmood Shafeie Zargar
Tony, I had tried next and previous keystrokes before, but they don't work. I had a look at the help commands as well, but they didn't contain anything about bibliography completion for Vim (They contained some instructions on command completion though). The verbose command returns the followin

Re: Proper Syntax for "\|" in vimrc regex?

2009-11-16 Thread ALP
On Nov 16, 10:57 am, Christian Brabandt wrote: > That should work: > map ,blah :%s/\(foo\\|bar\)//g I was afraid of that. That exact lines gives me "E492: Not an editor command: bar\)//g" Additionally, that exact line entered into the command line doesn't even work for me. Perhaps a problem wi

Re: Proper Syntax for "\|" in vimrc regex?

2009-11-16 Thread Charles Campbell
ALP wrote: > Hi all, > > I'm new to the group so let me know if my question etiquette is > lacking. > > I'm using gvim portable at work which utilizes vim 7.1.42 and in my > vimrc I can't find the proper syntax for a search/replace regex with > alternatives in a group; i.e. > > " delete all occurr

Re: Proper Syntax for "\|" in vimrc regex?

2009-11-16 Thread ALP
On Nov 16, 11:54 am, Charles Campbell wrote: > map ,blah :%s/\(foo\bar\)//g syntax with (whether it's \ or \\) doesn't cause a "not an editor command" error, but fails to remove occurrences of foo and bar in the document. So, my vim doesn't like variations of | at all and doesn't understand I

Re: Proper Syntax for "\|" in vimrc regex?

2009-11-16 Thread Charles Campbell
ALP wrote: > On Nov 16, 11:54 am, Charles Campbell > wrote: > >> map ,blah :%s/\(foo\bar\)//g >> > > syntax with (whether it's \ or \\) doesn't cause > a "not an editor command" error, but fails to remove occurrences of > foo and bar in the document. > > So, my vim doesn't like variatio

Re: Display custom reference bar on top of window

2009-11-16 Thread Charles Campbell
Christian Brabandt wrote: > On Sun, November 15, 2009 9:19 pm, Matteo Riva wrote: > >> I would like to set up a vim environment for basic HTML edit to be used >> by someone else. For this I'd like to set up a quick reference bar to >> be shown on top of the window with things like " | > />"

Re: Proper Syntax for "\|" in vimrc regex?

2009-11-16 Thread ALP
On Nov 16, 12:27 pm, Charles Campbell wrote: > 3. Check your cpoptions setting;  you don't want the "<" character in > there for this to work. >     See  :help map_bar Brilliant! I haven't yet figured out the subtleties of cpotions yet, but I found the alternative syntax of map ,blah %s/\(foo\

Re: Undoing changes after saving file

2009-11-16 Thread Christian Brabandt
Hi Efraim! On Mo, 16 Nov 2009, Efraim Yawitz wrote: > On Mon, Nov 16, 2009 at 11:51 AM, Christian Brabandt > wrote: > > You could possibly also try out the persistent undo feature. But for > > this you need to patch the vim source and compile yourself. See > > http://groups.google.com/group/vim

Re: Proper Syntax for "\|" in vimrc regex?

2009-11-16 Thread ALP
On Nov 16, 12:55 pm, ALP wrote: > map ,blah %s/\(foo\^V|bar\)//g^[ > (where ^V is the hex 16 and ^[ is hex 1b) Apologies... while ^[ works its actually an escape, I meant ^M (hex 0d). So I actually have the following working: map ,blah %s/\(foo\^V|bar\)//g^M --~--~-~--~~---

Re: Undoing changes after saving file

2009-11-16 Thread Christian Brabandt
On Mon, November 16, 2009 7:16 pm, Christian Brabandt wrote: > Disclaimer: I haven't compiled the patch yet myself, 'cause I do not > have a development machine with a recent Internet connection at the > moment, so this would be the method, I would use. :s/recent/decent/ regards, Christian -- :

Re: Minimap in VIM ?

2009-11-16 Thread Nicolas Aggelidis
On Mon, Nov 16, 2009 at 12:10 AM, Tony Mechelynck wrote: > > Maybe Emacs does it, that doesn't mean we have to ape it. Emacs can host > a shell in a split-window, Bram has firmly set his foot down, and > mainline Vim shall never do that. Emacs may include everything and the > kitchen sink, Vim do

Re: customize my initial window size

2009-11-16 Thread Frank Shute
On Fri, Nov 13, 2009 at 08:24:07PM -0800, Jason wrote: > > > I would like to set the initial window size and position of Gvim in > Ubuntu. In my .vimrc file, I have: > if has("gui_running") > " GUI is running or is about to start. > " Maximize gvim window. > set lines=99 columns=100 > else

Re: Undoing changes after saving file

2009-11-16 Thread bill lam
On Mon, 16 Nov 2009, Christian Brabandt wrote: > Disclaimer: I haven't compiled the patch yet myself, 'cause I do not > have a development machine with a recent Internet connection at the > moment, so this would be the method, I would use. I tried and it work as advertised, my observations. 1.

Re: Proper Syntax for "\|" in vimrc regex?

2009-11-16 Thread Tony Mechelynck
On 16/11/09 16:32, ALP wrote: > > Hi all, > > I'm new to the group so let me know if my question etiquette is > lacking. > > I'm using gvim portable at work which utilizes vim 7.1.42 and in my > vimrc I can't find the proper syntax for a search/replace regex with > alternatives in a group; i.e. >