Re: Understanding regxp implementation
This mail bounced off for some reason, I'm repeating it. Sorry if you've already got this. - Hi Bram, Nikolai, All, I think the best way to understand current implementation of regxp is to first go through Henry Spencer's original regxp implementation ( thanks nikolai ). It's very compact and easy to mess with. After that, I think I would be able to come up with a hack to include new code into vim's regxp code base ( either TRE or our own implementation ). By the way, I have decided to apply for the GSoc ( I beleive I can crack this with the help of all of you ). I'm really greateful for the help provided by Nikolai and Bram, Thank you very much! ps : even if I'm not selected, I would still like to contribute to this project... :-) - Asiri
Re: improving encryption in vim
Nicolas Weber wrote: To clarify, based on my understanding: if software is exported from the U.S., which vim arguably is, and it is capable of powerful encryption isn't vim exported from the Netherlands? Right, the main ftp server is in the Netherlands. All the rest are (cached) copies. I'm not a lawyer, but I would say that this means that the code isn't exported from the USA. It was already outside. I'm not sure about the CVS server at SourceForge. Generally I don't really care about these stupid US rules. The actual result is not that access to strong encryption by non-US contries decreases but that the development is done outside of the US, with the effect that knowledge outside of the US grows. -- TIM:Too late. ARTHUR: What? TIM:There he is! [They all turn,, and see a large white RABBIT lollop a few yards out of the cave. Accompanied by terrifying chord and jarring metallic monster noise.] Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Copying a Massive amount of text to the clipboard
On Wed, 21 Mar 2007 07:45:39 +0100, A.J.Mechelynck [EMAIL PROTECTED] wrote: Method II: If you know exactly the line numbers you want: :3,90003y + For Method II, see :help :y. And if you don't know the line numbers (and don't want to find out and remember them) you can go to the first line and create a mark (ma), go to the last line, and do :'a,.y + (This style of address specification works for vi too, though the + doesn't.) -- Matthew Winn
Re: Consistently exit message display with 'q'?
- Original Message - From: Jean-Rene David [EMAIL PROTECTED] To: vim@vim.org Sent: Tuesday, March 20, 2007 9:56 AM Subject: Re: Consistently exit message display with 'q'? * Bram Moolenaar [2007.03.20 11:45]: How many times did I repeat a command just because I had pressed Space one time too many... You can type g to go back to the messages. Thanks! Didn't know about that. Reading the help, this only brings back the last viewed page of messages though. Not quite the same thing as bringing up the complete output of the last command. Also note that it works only for internal commands. The original post gave both an internal (set) and external (!ls) command in his example... Brett Stahlman -- JR
automatically save to filename
I know that you can set the interval to auto-save to the swap file but how do I automatically save to the named file itself every n seconds? Thanks -- Eric Smith
Re: netrw: gracefully recovering from botched login
Marv Boyes wrote: Hello, all. This is going to seem painfully basic, I'm sure, but I haven't been able to find an answer elsewhere. I often use Vim to edit files over a network, and I have an unfortunate propensity for mis-typing my passwords on the first try. Also unfortunately, I find that the only way I can successfully log in is to close Vim altogether and re-start; netrw re-uses the incorrect password whenever I try to log in again from my original Vim session. Is there an easier way to wipe netrw's memory of the password, without having to start all over? Any guidance would be greatly appreciated, and I'm sorry if I've overlooked the solution in a FAQ, this list, or :help netrw. Many thanks in advance. :help netrw-passwd brought up a paragraph which has as its second sentence: See |netrw-uidpass| for how to change the password after one has set it. So, I suggest referrign to :he netrw-uidpass . Regards, Chip Campbell
Re: Updated Windows installer 7.0.219
Is this version compiled with +python/dyn or +python? If so, is it python 2.4 or 2.5? On 3/20/07, fREW [EMAIL PROTECTED] wrote: On wtorek 20 marzec 2007, vim@vim.org wrote: firewall our build machine sits behind. So I'm open to solutions for how to remove obsoletes from the file set. I had considered deleting the oldest files, but in most cases (such as the current) the files to be removed are generally newer than the rest. The best I can do is to occasionally delete the whole set and re-download, but with the new spelling dictionaries, this is 200+ MB each time and I hate to waste the bandwidth. Suggestions? Put that on users bandwidth - let download dictionaries during install from Vim page, distribute only English dicts. Dictionary can be downloaded later even when trying to use particular dictionary. m. That's a good call. And if you give them the option of which dictionaries to install you can save even more. -- -fREW -- Panos Laganakos
RE: Quick search using vimgrep
Thanks, that's what I wanted. I've modified it slightly so it automatically opens the quick fix windows too. Christophe -Original Message- From: Stahlman Family [mailto:[EMAIL PROTECTED] Sent: 21 March 2007 12:40 To: Christophe Dupre; vim@vim.org Subject: Re: Quick search using vimgrep - Original Message - From: Christophe Dupre [EMAIL PROTECTED] To: vim@vim.org Sent: Wednesday, March 21, 2007 5:19 AM Subject: Quick search using vimgrep Hello, I use the vimgrep command quite a lot to find where functions, or variables are used in different files I normally type something like that: :vimgrep FunctionName *.c ..\Includes\*.h Perhaps something like this... nmap F3 :vimgrep cword *.c ..\Includes\*.hCR Brett Stahlman That works fine for me but typing the same line whenever I'm looking for a different word can be quite time consuming. Is there something I can do so that when the cursor is over a word I could just type a key, and then the vimgrep command would run? Thanks, Christophe D.
RE: Updated Windows installer 7.0.219
From: Panos Laganakos, Wed, March 21, 2007 9:16 am Is this version compiled with +python/dyn or +python? If so, is it python 2.4 or 2.5? See the notes for the file: http://sourceforge.net/project/shownotes.php?release_id=495061group_id=43866 -- Steve Hall [ digitect dancingpaper com ] :: Cream for Vim :: http://cream.sourceforge.net
RE: OT: Apparently I work for Bram...
When company is a mandatory field, sometimes I write in n/a no company or the like. If the computer rejected that, I could always try None Whatsoever, Pty., but usually it doesn't. Computers are too matter-of-fact for anything like irony. I usually just make up a company name, like Spacely Sprockets, Strickland Propane, Credit Dauphin, etc. shrug/
Re: Updated Windows installer 7.0.219
Ah, great. Thanks. On 3/21/07, Steve Hall [EMAIL PROTECTED] wrote: From: Panos Laganakos, Wed, March 21, 2007 9:16 am Is this version compiled with +python/dyn or +python? If so, is it python 2.4 or 2.5? See the notes for the file: http://sourceforge.net/project/shownotes.php?release_id=495061group_id=43866 -- Steve Hall [ digitect dancingpaper com ] :: Cream for Vim :: http://cream.sourceforge.net -- Panos Laganakos
Re: automatically save to filename
On 3/21/07, Eric Smith [EMAIL PROTECTED] wrote: I know that you can set the interval to auto-save to the swap file but how do I automatically save to the named file itself every n seconds? Yes, you can use 'CursorHold' autocommand for that. The following (untested) is probaly an easy starting point: au CursorHold * :up! au CursorHoldI * up! Normally, file does not become modified without keyboard interaction, right ? So you do not really need the periodic saving when there was no keys pressed.I think CursorHold/CursorHoldI will serve nicely here, without need for periodic repeating. Yakov
RE: Copying a Massive amount of text to the clipboard
I have a 9MB XML files I am working with. Eep! I would like to select a block of about 90,000 lines in a file and copy them to the clipboard so they can be pasted in another file. Via 'vim', or another program/editor? Is there anyway to say to vim: Start selecting on line 3, and continue selecting to 90,000 ? Me personally? Would go to the first line to be selected and mm then go to the last line to be selected and mn then :'m,'nw qwqwqw to write it out to a junkfile 'qwqwqw' (pick an equally nonsensical filename you'll remember to delete afterward). Then go to the file to incorporate the new text, go to the line where you want to read it in, and :.r qwqwqw and be done with it. No monkeying around with the clipboard wondering if the system will puke on something that big. Natch, delete 'qwqwqw' unless you want to keep it around for another insertion elsewhere.
Re: google summer of code: gdb - vim
I've tried clewn, and while it works (somewhat) it's far from perfect. I had also hoped for such a summer of code project. Solid debugger support is about the only thing left that I really miss in vim. Is it too late to add new project suggestions by now? /Erik On 3/17/07, Russell Bateman [EMAIL PROTECTED] wrote: The project to integrate vim and gdb usefully is called clewn and is on clewn.sourceforge.net. I think there may be others as well. Mathieu Malaterre wrote: Hello, I was looking at the ideas page for google summer of code for vim, and I did not see integration of gdb in vim. As far as I know this is something that is half-working ? Could someone please let me know of any solution for a nice integration of gdb within vim. Thanks
Matchit with PL/SQL
Hello. I have just discovered the matchit plugin and have been using it to navigate some Oracle PL/SQL scripts. My issue is as follows. If I have a script containing: create or replace procedure foo as begin null ; end ; then by placing the cursor on the word begin and hitting % the cursor jumps to the word end. Great, thats what I want. But if the script is create or replace procedure foo as begin null ; end foo ; i.e. it names the procedure after the closing end, then the above navigation doesnt work. Im loathe to change b:match_words as it looks a bit hairy, but if someone has already addressed this, or can suggest a workaround, Id be grateful. Thanks.
Re: missing some easy integration in gnome?
Maybe I have not been really clear and got lost in details in my first mail. To put it straight: 1: Do we want to be able to handle files opened by or dragged from nautilus over a remote connection? 2: Do we want to implement some options to make gvim behave more like gedit in the way it treat multiple files (tabs, all in one instance). It's about adding some options, not making that the default. I think it's *not* *much* *coding* to get it. If you use gnome and nautilus you may value this kind of behaviour. Il giorno mer, 21/03/2007 alle 07.35 +0100, A.J.Mechelynck ha scritto: Andrea Ratto wrote: I think we are missing some easy integration with gnome desktop. Here is how I got to think so: I was working with some files on a remote folder using nautilus and noticed I could open remote text files with gedit transparently; but that did not work with gvim. I knew vim can handle editing over ssh, and I would really value clicking on a remote file and have it opened in gvim instead of gedit. To cut a long story short I ended up in making this small script under /usr/local/bin #!/bin/bash if [[ $# = 0 || $# = 1 $1 = -f ]]; then /usr/bin/gvim $1 else /usr/bin/gvim --remote-tab `echo $@ | sed 's/-f//' | sed 's/ssh: \/\/\(\w\+\)@\(\w\+\)\//scp:\/\/[EMAIL PROTECTED]/\//gi'` fi And now gvim behaves just like gedit! I can open files from nautilus in the existing gvim session and open files from a ssh folder. I like this behaviour and I think that very little work is necessary to implement such features in the official gvim, at least in the one with gnome support. Basically what we need to get this quikly is: 1: have netrw handle links like ssh:[EMAIL PROTECTED]/folder/file just like it handles scp:[EMAIL PROTECTED]//folder/file. May require similar changes for other protocols as well. 2: allow --remote-tab with no argument to open a blank gvim session instead of failing what about --remote-tab-silent ? It's better because does not produce useless output, but still works the same way. Thanks for pointing it out, my example script should use that, but the way it works it's not going to change. 3: change the exec line of the gvim.desktop from gvim -f %U to gvim -f -p --remote-tab %F IIUC, that's not a change in Vim. It may be a change in the Vim package in your Linux distro if it installs that Vim shortcut. The make install from the official Vim installation (as downloaded straight from ftp.vim.org ) installs no keyboard shortcut. It's a menu entry not a keyboard shortcut. It sets the code to be run when you open a file by clicking on it or when you click the gvim icon. But IMHO those --remote-tab and -p parameters shouldn't be there by default. I don't know the difference between %U and %F. %U does one invocation per file opened, like gvim fileone; gvim filetwo ... %F does one invocation with all files as arguments like gvim fileone filetwo ... Even better: we could add some internal options like :set remotetabs and :set openintabs so that this behavior can be set on a per user basis. This would be elegant and could work with gvim -f %F exec command in the .dekstop file. I'm skeptical about the usefulness of such additional options. Could you use gedit for a while, with multiple files? This may explain the point better. I'd like to know your opinions about this. PS: it also seems that --remote-tab does play well with gnome startup-notification when a session is already opened, but this is just a cosmetic bug. The fact that it does indeed play well is a cosmetic bug ??? There's something there that I don't quite grasp. After opening in a remote tab from gnome the cursor is set to the busy state even after the file is fully loaded. I don't want to insist on this right now since it's probably easy to fix and it's just cosmetic. Best regards, Tony. Thanks Tony.
Re: Matchit with PL/SQL
(Had to top post) I am the author of ftplugin/sql.vim which defines b:match_words. It was set this way so that the following will not match. begin end if I didn't realize plsql allowed your case. I think this could be addressed by saying the end cannot be followed by the known end statements like: End if End case Could you put together a conslusive list of plsql keywords that begin with end and I can update the script. I will probably make it an option that can be set (with on as the default) in case this breaks other dbs syntax. Dave - Original Message - From: [EMAIL PROTECTED] Sent: 03/21/2007 01:35 PM To: vim@vim.org Subject: Matchit with PL/SQL Hello. I have just discovered the matchit plugin and have been using it to navigate some Oracle PL/SQL scripts. My issue is as follows. If I have a script containing: create or replace procedure foo as begin null ; end ; then by placing the cursor on the word begin and hitting % the cursor jumps to the word end. Great, thats what I want. But if the script is create or replace procedure foo as begin null ; end foo ; i.e. it names the procedure after the closing end, then the above navigation doesnt work. Im loathe to change b:match_words as it looks a bit hairy, but if someone has already addressed this, or can suggest a workaround, Id be grateful. Thanks.
Re: google summer of code: gdb - vim
Erik Bergman wrote: I've tried clewn, and while it works (somewhat) it's far from perfect. I had also hoped for such a summer of code project. Solid debugger support is about the only thing left that I really miss in vim. Is it too late to add new project suggestions by now? You can submit applications until March 24. -- TIM: But follow only if you are men of valour. For the entrance to this cave is guarded by a monster, a creature so foul and cruel that no man yet has fought with it and lived. Bones of full fifty men lie strewn about its lair ... Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Customizing vim: How to change the char before commands
Hello, I'm new to Vim. I want to change the character before commands. For example saving is done by: :w enter Can it be made slightly easier by just pressing 'g' or some other key that's not taken? I don't know why every command has to be pre-pended by a difficult to reach character like colon. In an old text editor (I think one by Borland), you could save by pressing just one key, i.e. F2. This isn't a flame.. I just want to do simple commands like save, quit, save and quit, etc. with fewer than four keys. One key like 'g' or F2 or something would be awesome. Ctrl + key would be nice too. Thanks, -- View this message in context: http://www.nabble.com/Customizing-vim%3A-How-to-change-the-char-before-commands-tf3443878.html#a9603552 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Customizing vim: How to change the char before commands
On 3/21/07, Some user [EMAIL PROTECTED] wrote: Hello, I'm new to Vim. I want to change the character before commands. For example saving is done by: :w enter Can it be made slightly easier by just pressing 'g' or some other key that's not taken? I don't know why every command has to be pre-pended by a difficult to reach character like colon. In an old text editor (I think one by Borland), you could save by pressing just one key, i.e. F2. :nmap f2 :wcr You *can also map those keys which are native vim commands. There are many vim commands that you use rarely, and you can map them. But you can suffer from some side effects. For example, if you forget your mapping and try to use the mapped command for the original purpose. This happens. But still, it's sometimes convenient, and vim does not prohibit you from doing this. I might be flamed for this remark, but vim does not prohibit you from doing this, and this is sometimes convenient. Yakov
Re: Customizing vim: How to change the char before commands
I'm new to Vim. I want to change the character before commands. For example saving is done by: :w enter Can it be made slightly easier by just pressing 'g' or some other key that's not taken? I don't know why every command has to be pre-pended by a difficult to reach character like colon. In an old text editor (I think one by Borland), you could save by pressing just one key, i.e. F2. yes, the Borland IDE used to use F2 to save. This isn't a flame.. I just want to do simple commands like save, quit, save and quit, etc. with fewer than four keys. One key like 'g' or F2 or something would be awesome. Ctrl + key would be nice too. Most of the common letters and control-keys are occupied by existing[1]/useful[1]/non-portable commands[2]. However, the F# keys should be available. You want mappings, so to save, you'd want something like this: :nnoremap f2 :wcr (with all less-than and greater-than signs). For save+quit, there's ZZ in normal mode, and for abandon+quit, there's ZQ. I don't use either of them as discussed on the list a month or two ago (I like the intentionality of building it piece-by-piece regarding whether to quit, confirm, all files, and save/overwrite in the process) but they might be easier to use. However, you _can_ do things like :nnoremap f4 :wqcr to save+quit. [1] like the g you suggest...very useful [2] such as control+[SQ] which is available in some versions, but is terminal flow-control or control+Z which can suspend/minimize vim Just my $0.02 adjusted for inflation, minus taxes, social security, and medicare. -tim
RE: Matchit with PL/SQL
end case end if end loop Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wed 21 March 2007 20:36 To: bobf32; vim Subject: Re: Matchit with PL/SQL (Had to top post) I am the author of ftplugin/sql.vim which defines b:match_words. It was set this way so that the following will not match. begin end if I didn't realize plsql allowed your case. I think this could be addressed by saying the end cannot be followed by the known end statements like: End if End case Could you put together a conslusive list of plsql keywords that begin with end and I can update the script. I will probably make it an option that can be set (with on as the default) in case this breaks other dbs syntax. Dave - Original Message - From: [EMAIL PROTECTED] Sent: 03/21/2007 01:35 PM To: vim@vim.org Subject: Matchit with PL/SQL Hello. I have just discovered the matchit plugin and have been using it to navigate some Oracle PL/SQL scripts. My issue is as follows. If I have a script containing: create or replace procedure foo as begin null ; end ; then by placing the cursor on the word begin and hitting % the cursor jumps to the word end. Great, thats what I want. But if the script is create or replace procedure foo as begin null ; end foo ; i.e. it names the procedure after the closing end, then the above navigation doesnt work. Im loathe to change b:match_words as it looks a bit hairy, but if someone has already addressed this, or can suggest a workaround, Id be grateful. Thanks.
Re: Customizing vim: How to change the char before commands
Tim Chase wrote: [...] Just my $0.02 adjusted for inflation, minus taxes, social security, and medicare. -tim LOL. Must be at least $20 after adjustment, no? Best regards, Tony. -- I believe that Ronald Reagan will someday make this country what it once was ... an arctic wilderness -- Steve Martin
Re: Customizing vim: How to change the char before commands
On Wed, Mar 21, 2007 at 06:04:46PM EST, A.J.Mechelynck wrote: Tim Chase wrote: [...] Just my $0.02 adjusted for inflation, minus taxes, social security, and medicare. -tim LOL. Must be at least $20 after adjustment, no? Isn't the other way 'round..? With 0.02 cents left for the list after adjustment? Thanks, cga
Re: Customizing vim: How to change the char before commands
cga2000 wrote: On Wed, Mar 21, 2007 at 06:04:46PM EST, A.J.Mechelynck wrote: Tim Chase wrote: [...] Just my $0.02 adjusted for inflation, minus taxes, social security, and medicare. -tim LOL. Must be at least $20 after adjustment, no? Isn't the other way 'round..? With 0.02 cents left for the list after adjustment? Thanks, cga Depends how much you reckon for inflation, and on which basis: two of George Washington's cents, plus inflation, would make a goodly sum nowadays, don't you think? Best regards, Tony. -- Equality is not when a female Einstein gets promoted to assistant professor; equality is when a female schlemiel moves ahead as fast as a male schlemiel. -- Ewald Nyquist
question about search
hello there, i am kinda new to vim, so i am wanting to learn the stuff that i think i will use the most first. One of the things i use a lot is search. i have found how to do a search like this /:s/reg/reg is there a way i can tab through the finds ? thanks
Re: question about search
shawn bright wrote: hello there, i am kinda new to vim, so i am wanting to learn the stuff that i think i will use the most first. One of the things i use a lot is search. i have found how to do a search like this /:s/reg/reg is there a way i can tab through the finds ? thanks The above (without the / before :s) replaces reg by reg. To search, use /pattern to search forward, or ?pattern to search backward; then use n to repeat the search, or N to go back. A pattern may be simple or complex: see :help pattern overview for a summary, or :help pattern for the formal grammar of Vim patterns. Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 129. You cancel your newspaper subscription.
Re: question about search
A.J.Mechelynck wrote: shawn bright wrote: hello there, i am kinda new to vim, so i am wanting to learn the stuff that i think i will use the most first. One of the things i use a lot is search. i have found how to do a search like this /:s/reg/reg is there a way i can tab through the finds ? thanks The above (without the / before :s) replaces reg by reg. To search, use /pattern to search forward, or ?pattern to search backward; then use n to repeat the search, or N to go back. A pattern may be simple or complex: see :help pattern overview for a summary, or :help pattern for the formal grammar of Vim patterns. Best regards, Tony. n -- Search again in the same direction N -- Search again in the opposite direction /CR -- Search again forward in the file. ?CR -- Search again backward in the file. If you start a backward search, 'n' will repeat it the the same direction, backward. Once you use the slash or question mark, 'n' will search in that direction and 'N' will search in the opposite. -- Just my 0.0002 million dollars worth, Shawn For the things we have to learn before we can do them, we learn by doing them. Aristotle
Re: question about search
cool, thanks, i knew there had to be something. thanks again. sk On 3/21/07, A.J.Mechelynck [EMAIL PROTECTED] wrote: shawn bright wrote: hello there, i am kinda new to vim, so i am wanting to learn the stuff that i think i will use the most first. One of the things i use a lot is search. i have found how to do a search like this /:s/reg/reg is there a way i can tab through the finds ? thanks The above (without the / before :s) replaces reg by reg. To search, use /pattern to search forward, or ?pattern to search backward; then use n to repeat the search, or N to go back. A pattern may be simple or complex: see :help pattern overview for a summary, or :help pattern for the formal grammar of Vim patterns. Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 129. You cancel your newspaper subscription.
Re: Customizing vim: How to change the char before commands
On Wed, Mar 21, 2007 at 07:16:58PM EST, A.J.Mechelynck wrote: cga2000 wrote: On Wed, Mar 21, 2007 at 06:04:46PM EST, A.J.Mechelynck wrote: Tim Chase wrote: [...] Just my $0.02 adjusted for inflation, minus taxes, social security, and medicare. -tim LOL. Must be at least $20 after adjustment, no? Isn't the other way 'round..? With 0.02 cents left for the list after adjustment? Thanks, cga Depends how much you reckon for inflation, and on which basis: two of George Washington's cents, plus inflation, would make a goodly sum nowadays, don't you think? Yes, but as you no doubt realize, there is such a big difference in terms of lifestyles between his time and ours that it's practically impossible to make such comparisons just using the value of money as your reference. In a sense it's as bit as if for some reason you decided to move to, say Guatemala .. where you would need to have access to quite a sizeable income to keep up with the lifestyle of the average middle-class Bruxellois .. but on the other hand you would live reasonably well on a handful of euros a day if you went native. Just my two .. no that's enough .. I won't say it. :-) Thanks, cga
Re: Consistently exit message display with 'q'?
Thanks for the clarification Brett. At least if you have external commands you use regularly though, you could wrap them in a vim function, thereby making them effectively internal, making g useful. Just an update - I promised I'd investigate extending my patch to help those people who complained about losing their commands if they pressed one too many keys. I tried the most obvious approach, and whilst it sort of worked, there was some unhandled complexity to do with reverting to more-prompt mode which I couldn't easily work out. I think it was because vim thought we had alreday exited more-prompt mode, when in fact we shouldn't have (so you couldn't scroll back up when you reached the end). Since this g command works somewhat (or can be made to work by using a wrapper function for external commands), I think I might give up on this and just be satisfied with the simpler q exits the Press Enter prompt change. Cheers, John On Wednesday 21 March 2007 23:55, Stahlman Family wrote: - Original Message - From: Jean-Rene David [EMAIL PROTECTED] To: vim@vim.org Sent: Tuesday, March 20, 2007 9:56 AM Subject: Re: Consistently exit message display with 'q'? * Bram Moolenaar [2007.03.20 11:45]: How many times did I repeat a command just because I had pressed Space one time too many... You can type g to go back to the messages. Thanks! Didn't know about that. Reading the help, this only brings back the last viewed page of messages though. Not quite the same thing as bringing up the complete output of the last command. Also note that it works only for internal commands. The original post gave both an internal (set) and external (!ls) command in his example... Brett Stahlman -- JR
Re: Consistently exit message display with 'q'?
John Orr [EMAIL PROTECTED] 写于 2007-03-22 12:43:51: Thanks for the clarification Brett. At least if you have external commands you use regularly though, you could wrap them in a vim function, thereby making them effectively internal, making g useful. Just an update - I promised I'd investigate extending my patch to help those people who complained about losing their commands if they pressed one too many keys. I tried the most obvious approach, and whilst it sort of worked, there was some unhandled complexity to do with reverting to more- prompt mode which I couldn't easily work out. I think it was because vim thought we had alreday exited more- prompt mode, when in fact we shouldn't have (so you couldn't scroll back up when you reached the end). Since this g command works somewhat (or can be made to work by using a wrapper function for external commands), I think I might give up on this and just be satisfied with the simpler q exits the Press Enter prompt change. Cheers, John Just done some experiment, if I use j/k or up/down to scroll within the more-prompt the message will never quit. Seems good but not quite useful to me since I always use f/b or pgdn/pgup to view the message. So the only issue is the lack of f/b or PgDnPgUp support for the more-prompt and hit-enter-prompt. key f and b is the standard page-scrolling key for less and more, it seems strange that the more-prompt and hit-enter-prompt do not have support the f and b key. Let's hope it will be available in future versions. -- Sincerely, Pan, Shi Zhu
Re: question about search
Shawn Vim friends, On Mar 21, 2007, at 6:21 PM, shawn bright wrote: cool, thanks, i knew there had to be something. And it keeps getting better. Due to Vim's extensive programmability (and keystroke mapping and the endless creativity of its developer and user communities), you can extend its behavior to your needs. When you use the n and N keystrokes to step forward and backwards through the list of matches for a pattern, the focus inevitably moves down the screen from match to match until it reaches the last match on the screen, then the screen scrolls up or down to bring the next of-screen match into view... I tire of having to follow the cursor up and down the screen following the cursor, so I came up with a solution that works for me. Now, I happen to use a Mac, so the keystrokes I've mapped make sense to me, but might be different for someone else... This is a chunk out of my .vimrc file: Command-[ and Command-] put the prev/next match at top of screen map D-[ kNzCR put prev match at top of screen map D-] jnzCR put next match at top of screen Thus, after having typed something like: /foo with my mappings, I can type command-] to go to the next match AND scroll it to the top of my screen. That way, my tired old eyes can sit in one place and watch the matches come to them. This is especially handy when I'm editing a data file that has a lot of lines that are formatted quite similarly: as the matched lines replace each other as the first line on the screen, I clearly see the parts that stay the same and the parts that change -- I make a lot fewer mistakes that way. Dave
Re: question about search
Dave Land wrote: Shawn Vim friends, On Mar 21, 2007, at 6:21 PM, shawn bright wrote: cool, thanks, i knew there had to be something. And it keeps getting better. Due to Vim's extensive programmability (and keystroke mapping and the endless creativity of its developer and user communities), you can extend its behavior to your needs. When you use the n and N keystrokes to step forward and backwards through the list of matches for a pattern, the focus inevitably moves down the screen from match to match until it reaches the last match on the screen, then the screen scrolls up or down to bring the next of-screen match into view... I tire of having to follow the cursor up and down the screen following the cursor, so I came up with a solution that works for me. Now, I happen to use a Mac, so the keystrokes I've mapped make sense to me, but might be different for someone else... This is a chunk out of my .vimrc file: Command-[ and Command-] put the prev/next match at top of screen map D-[ kNzCR put prev match at top of screen map D-] jnzCR put next match at top of screen Thus, after having typed something like: /foo with my mappings, I can type command-] to go to the next match AND scroll it to the top of my screen. That way, my tired old eyes can sit in one place and watch the matches come to them. This is especially handy when I'm editing a data file that has a lot of lines that are formatted quite similarly: as the matched lines replace each other as the first line on the screen, I clearly see the parts that stay the same and the parts that change -- I make a lot fewer mistakes that way. Dave I don't think j and k are necessary in your mappings; they may be downright counter-productive (going back forever to the same match) after a ? search. Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 130. You can't get out of your desk even if it's time to eat or time to go to the bathroom.