Re: Win64-related patches
On 12/02/2007 07:48, George V. Reilly wrote: * Win64 changes to make code compile cleanly: eval.c, misc2.c, if_ole.* * Fixed install.exe bug * Fixed annoying warning from Explorer about gvimext.dll * Fixed gvim.exe.mnf to be cross-platform. No longer needs to be generated from Make_mvc.mak * Re-fixed spell.c so that it works with VC6. Unit tests go into an infinite loop otherwise. * Updated INSTALLpc.txt to reflect that Visual C++ 2005 Express Edition is now free forever, recommending it over the VC 2003 Toolkit. * Cleaned up Make_mvc.mak, incorporating (and fixing) recent patches from Alexei Alexandrov and Mike Williams Last week's service pack for VS2005 has changed the nmake version number. It just needs the following three lines adding after the ones for the previous version for VS2005. !if $(_NMAKE_VER) == 8.00.50727.762 MSVCVER = 8.0 !endif I also had to edit make_mvc.mak for tests of MSVCVER as nmake did not like it enclosed in quotes. The expressions had to be of the form !if $(MSVCVER) == ... Since MSVCVER is set to a string the extra quotes end up being double double quotes which is invalid syntax. Should MSVCVER be set to string in the makefile? What do they come through as from the platform SDK? Apart from that all seems to work as expected. * Added mkdist.bat to copy all of the installable files to vim70 directory, where they are zipped up, for later installation on Win64 or Win32. * Made a futile attempt to get gvim.nsi building. Just building. Never mind running on Win64. * Fixed a bug in test60: test60.ok must have Unix line endings I have tested this code with the VS 98 (VC6), VS .NET 2003 (VC 7.1), VS 2003 Toolkit (VC 7.1), Visual Studio 2005 (VC8), Visual Studio 2005 Express Edition (VC 8), and the VS 2005 x64 cross-compiler. I'll re-test the Win64 binaries on a borrowed AMD64 machine at work tomorrow. As of yesterday, I was able to use install.exe to successfully install gvim and register gvimext.dll, giving the Edit with Vim entry in the Explorer context menu. Once everything is retested, I'll make fresh Win64 binaries available. One bug that I didn't fix. Build gvim.exe with OLE=no, run 'gvim -register', and watch it crash while trying to display an error message. Mike -- Sometimes a majority means that all the fools are on one side.
Re: New php.vim indent script
This quickly moved to version 1.2 and this is the recommended version: http://www.vim.org/scripts/script.php?script_id=346 Miles Lott wrote: I have uploaded version 0.8 of my indent file for php. This was the file included in 6.X which was replaced by John's script in 7.X. After 5 years it still works for me, so please let me know what you think.
Re: Reminder: Vim presentation in Mountain View tomorrow
As announced, Bram gave an interesting talk about vim on the Google campus last week, for those who couldn't be there, there is a well made video of it there: http://video.google.com/videoplay?docid=2538831956647446078 Maybe it should also be linked from the news entry on vim.org? Off-topic, but since google announced it's third season for the Summer Of Code, wouldn't it be interesting to have vim participate in it? Or is the problem, that you, Bram, already have too little time to play mentor, and there aren't other core developers for this task? -- Martin
Re: patch 7.0.198 (extra)
Patch 7.0.198 (extra) Problem:Win32: Compiler warnings. No need to generate gvim.exe.mnf. Solution: Add type casts. Use * for processorArchitecture. (George Reilly) Files: src/Make_mvc.mak, src/eval.c, src/gvim.exe.mnf, src/misc2.c This patch collides with some patches I posted earlier. I adopted my patches. They can be downloaded for a while from http://members.tcnet.ch/michaelis/vim/patches.zip With kind regards Mathias
[PATCH] minor typo in tutor
Index: runtime/tutor/tutor === --- runtime/tutor/tutor (revision 218) +++ runtime/tutor/tutor (working copy) @@ -568,10 +568,10 @@ 4. To change every occurrence of a character string between two lines, type :#,#s/old/new/gwhere #,# are the line numbers of the range - of lines where the subsitution is to be done. + of lines where the substitution is to be done. Type :%s/old/new/g to change every occurrence in the whole file. Type :%s/old/new/gc to find every occurrence in the whole file, - with a prompt wether to substitute or not. + with a prompt whether to substitute or not. ~~ LESSON 4 SUMMARY
RE: [PATCH] minor typo in tutor
Hmm.. apologies if my mail client messed that up. Find the patch attached. cheers tutor.patch Description: tutor.patch
Recording of Vim presentation available
Dear Vim users, A week ago I did a presentation on Vim, called Seven habits of effective text editing 2.0. I was happy to see a lot of people come to listen to me. Many more than expected, we ran out of food and had to get extra chairs. Thanks to all who were there, it was nice to have a big audience. And I was excited to greet some of the people who I previously only knew through e-mail. The video of the presentation is now available on Google video: http://video.google.com/videoplay?docid=2538831956647446078 The presentation itself is about 45 minutes. With the QA included it is 80 minutes. If you can't use Google video, you may get the video file from the ftp server: ftp://ftp.vim.org/pub/vim/stuff/7Habits20.avi This is 507 Mbyte of divx. You may want to use a mirror site: ftp://ftp.vim.org/pub/vim/MIRRORS It's a lot quicker to get the PDF with the presentation and notes: http://www.moolenaar.net/habits.pdf This is about 640 Kbyte. -- hundred-and-one symptoms of being an internet addict: 163. You go outside for the fresh air (at -30 degrees) but open the window first to hear new mail arrive. /// 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: Reminder: Vim presentation in Mountain View tomorrow
Martin Stubenschrott wrote: As announced, Bram gave an interesting talk about vim on the Google campus last week, for those who couldn't be there, there is a well made video of it there: http://video.google.com/videoplay?docid=2538831956647446078 Maybe it should also be linked from the news entry on vim.org? Did that just a few minutes ago. Forgot one more link: if you are interested in the books, look here: http://www.iccf.nl/click2.html Off-topic, but since google announced it's third season for the Summer Of Code, wouldn't it be interesting to have vim participate in it? Or is the problem, that you, Bram, already have too little time to play mentor, and there aren't other core developers for this task? I'm thinking of it. The main task would probably be to fix known problems. If there is one feature that people ask for, and is #1 on the voting list, it's integration with Eclipse. -- hundred-and-one symptoms of being an internet addict: 166. You have been on your computer soo long that you didn't realize you had grandchildren. /// 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: [PATCH] minor typo in tutor
Michael Wookey wrote: Hmm.. apologies if my mail client messed that up. Find the patch attached. Thanks. These typos must have been there for ages. -- Microsoft says that MS-Windows is much better for you than Linux. That's like the Pope saying that catholicism is much better for you than protestantism. /// 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///
[correction] Recording of Vim presentation available
I wrote: It's a lot quicker to get the PDF with the presentation and notes: http://www.moolenaar.net/habits.pdf This is about 640 Kbyte. But that's the old one! Use this link instead: http://www.moolenaar.net/habits_2007.pdf Oh, and in case you are interested in the books mentioned, use this link: http://iccf-holland.org/click2.html Sorry for the confusion. -- hundred-and-one symptoms of being an internet addict: 168. You have your own domain name. /// 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: Cursor position - file history
On 2/20/07, David Woodfall [EMAIL PROTECTED] wrote: Is there any way of getting vim to remember more previously opened file cursor positions? Searching for history only yields command history. -- It's easier to get forgiveness for being wrong than forgiveness for being right. Try set viminfo='200,50,s10,:20,h set viminfo='300,50,s10,:20,h set viminfo='500,50,s10,:20,h :help 'viminfo' Yakov
Re: Cursor position - file history
On Tue 20-Feb-07 1:23am -0600, David Woodfall wrote: Is there any way of getting vim to remember more previously opened file cursor positions? Searching for history only yields command history. :helpgrep history\c yielded 214 hits from the $VIMRUNTIME docs. For specific help: :h 'viminfo' The ' parameter is what I think you want - the default is to save marks for 20 files. -- Best regards, Bill
Caseless tag matching
I'm using ctags and I want to do case less matching for tags. I tried setting the 'ignorecase' and 'infercase', but that doesn't give me the actual tag I need to insert. The word, it completes is correct, but they are wholly either in upper case or lower case. Any way to go? Thanks Jeenu
Re: Re : Omni Confusion
I forgot to mention that you have to build your tags database with this command : ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . You'll see more details on these parameters in the help file. Moreover, there is a recent bug where you have to disable the ignorecase function to complete correctly your code (eg: A* a), it will be fixed. Best regards, Vissale 2007/2/20, Bill McCarthy [EMAIL PROTECTED]: On Mon 19-Feb-07 6:14am -0600, Vissale NEANG wrote: To use cpp completion with c files you can copy ~/.vim/after/ftplugin/cpp.vim to ~/.vim/after/ftplugin/c.vim This apparently doesn't work with C. I've installed it and copied cpp.vim to c.vim as instructed above. It automatically goes into omni mode when I type the '' in: b- However it reports Pattern not found - yes I created the tags file. I tried again with each function parameter on a separate line - that didn't matter to your function, but worked perfectly after deleting after/ftplugin/c.vim If anyone else wants to see this happen, here is a complete, albeit trivial, program (try to omni complete a line of C code starting with b- in the function myfunc(): #include stdio.h #include stdlib.h typedef struct A { int a1; int a2; int a3; } A; typedef struct B { int b1; int b2; int b3; } B; void myfunc( A *a, B *b ); int main( void ) { A x; B y; myfunc( x, y ); printf( %d %d %d\n, x.a1, x.a2, x.a3 ); printf( %d %d %d\n, y.b1, y.b2, y.b3 ); return EXIT_SUCCESS; } void myfunc( A *a, B *b ) { a-a1 = 1; a-a2 = 2; a-a3 = 3; b-b1 = 4; b-b2 = 5; b-b3 = 6; } -- Best regards, Bill
run make! from subdirs
Hi! Someone noticed that if I add this line into .vimrc: autocmd BufEnter * :cd %:p:h I'll be able to run :make and vim will automatically look at the directory where currently opened file is located for Makefile. But if I have directory structure like this: [d]ProjectDir main.cpp Makefile [dir]SrcDir1 file1.cpp [dir]SrcDir2 file2.cpp this command do not work. Makefile is located in root ProjectDir and if I open for example file1.cpp from SrcDir1, vim can't locate Makefile and I HAVE TO SWITCH TO ANOTHER BUFFER which contains some source from ProjectDir in order to compile program... Is there any opportunity to solve this situation. I have to recompile project very often while debug sessions, and there is really huge dir hierarchy... -- God bless you! Ilia 2.6.19-gentoo-r5 AMD Athlon(tm) XP 2600+ mailto: [EMAIL PROTECTED] icq: 198233378 VegaTrek Developer: http://wcuniverse.sourceforge.net/vegatrek/ VegaTrek Forum Moderator: http://vegastrike.sourceforge.net/forums/viewforum.php?f=13 You know you're using the computer too much when: you almost every night have a dream about an neverending emerge, and you dont have a clue about what's beeing emerged. -- geniux $gpg --keyserver cryptonomicon.mit.edu --search-keys tillias
Re: Re : Omni Confusion
Vissale, On Tue 20-Feb-07 2:25am -0600, you wrote: I forgot to mention that you have to build your tags database with this command : ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . You'll see more details on these parameters in the help file. Moreover, there is a recent bug where you have to disable the ignorecase function to complete correctly your code (eg: A* a), it will be fixed. Thank you. It seems to almost works (with either 'ic' or 'noic'). What's missing is the [ for array members. The builtin omni support for C provides the [ for arrays - this was also mentioned in Bram's Google presentation - he must not have been using your plugin. -- Best regards, Bill
obby support
Hi I'm using gobby a lot, and it is great! (http://gobby.0x539.de/trac/). There is an issue about gobby thought. I miss the power of vim. Gobby has a protocoll namned obby, this is already impleted in emacs. Would this be easy to do in vim? What would be the best approach and is somone already working on it? regards iveqy
Re: run make! from subdirs
On 2/20/07, Ilia N Ternovich [EMAIL PROTECTED] wrote: Someone noticed that if I add this line into .vimrc: autocmd BufEnter * :cd %:p:h I'll be able to run :make and vim will automatically look at the directory where currently opened file is located for Makefile. But if I have directory structure like this: [d]ProjectDir main.cpp Makefile [dir]SrcDir1 file1.cpp [dir]SrcDir2 file2.cpp this command do not work. Makefile is located in root ProjectDir and if I open for example file1.cpp from SrcDir1, vim can't locate Makefile and I HAVE TO SWITCH TO ANOTHER BUFFER which contains some source from ProjectDir in order to compile program... Is there any opportunity to solve this situation. I have to recompile project very often while debug sessions, and there is really huge dir hierarchy... Setting VIMINIT to something like: source $HOME/.vimrc | autocmd BufEnter * :cd $PROJECTROOT should do the trick. You can either define a shell function to turn this on and off, or use an alias (or a simple shell script) to invoke vim with something like: VIMINIT=source $HOME/.vimrc | autocmd BufEnter * :cd $PROJECTROOT vim $@ so you have a general command vim, and a project specific command projectvim (or whatever). Alternatively, you can define a shell script pmake (for project make) which does the cd, then executes the real make. Then set makeprg=pmake. -- James Kanze (GABI Software) email:[EMAIL PROTECTED] Conseils en informatique orientée objet/ Beratung in objektorientierter Datenverarbeitung 9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Re: run make! from subdirs
Hi Ilia, to me it looks like you always want to compile using the Makefile in ProjectDir. I don't know if this helps much, but I would recommend to open the Makefile in one buffer, then hide it: :hid and do your source editing. When you want to compile your files, use :sb Maktab to switch to the Makefile in a split window and start :make as usual. After compilation, you can hide the Makefile again and continue working. An alternate way would be to change your make command as James proposed. Or you could write a macro to change to the directory and run make :help macro Cheers, Wolfgang Someone noticed that if I add this line into .vimrc: autocmd BufEnter * :cd %:p:h I'll be able to run :make and vim will automatically look at the directory where currently opened file is located for Makefile. But if I have directory structure like this: [d]ProjectDir main.cpp Makefile [dir]SrcDir1 file1.cpp [dir]SrcDir2 file2.cpp this command do not work. Makefile is located in root ProjectDir and if I open for example file1.cpp from SrcDir1, vim can't locate Makefile and I HAVE TO SWITCH TO ANOTHER BUFFER which contains some source from ProjectDir in order to compile program... Is there any opportunity to solve this situation. I have to recompile project very often while debug sessions, and there is really huge dir hierarchy...
Re: run make! from subdirs
Hello, Ilia N Ternovich [EMAIL PROTECTED] wrote: Someone noticed that if I add this line into .vimrc: autocmd BufEnter * :cd %:p:h I'll be able to run :make and vim will automatically look at the directory where currently opened file is located for Makefile. You can use plugins like project.vim or local_vimrc [1] to set your 'makeprg' when the current path is under your ProjectDir. The typical setting for makeprg would be cd /abs/path/to/ProjectDir ; make $* [1] http://hermitte.free.fr/vim/ressources/vimfiles/plugin/local_vimrc.vim HTH, -- Luc Hermitte http://hermitte.free.fr/vim/
Re: ant plugin recomendation
Hello, Andrea Ratto [EMAIL PROTECTED] wrote: I need some plugin to be able to compile using ant and parse it's output from vim. I've seen there are some, but I want something small and simple i have not found yet. Any recomendation will be appreciated. Thanks. There is a compiler-plugin for ant. - :h compiler-plugin IIRC, it is not that useful when the real compiler is for instance GCC (g++ called through cppTask), and not javac. I finally chosed, with BuilToolWrapper [1], to rely on a very simple perl script that parses the output of the compilation - % #!/usr/bin/perl # Main loop: get rid of /^\s*[.*]\s*/ while () { chop; $_ =~ s/^\s*\[.*?\]\s*// ; print $_\n; } - % [1] http://hermitte.free.fr/vim/ressources/lh-BTW.tar.gz HTH, -- Luc Hermitte
Re: run make! from subdirs
On 2/20/07, Ilia N Ternovich [EMAIL PROTECTED] wrote: Hi! Someone noticed that if I add this line into .vimrc: autocmd BufEnter * :cd %:p:h I'll be able to run :make and vim will automatically look at the directory where currently opened file is located for Makefile. But if I have directory structure like this: [d]ProjectDir main.cpp Makefile [dir]SrcDir1 file1.cpp [dir]SrcDir2 file2.cpp this command do not work. Makefile is located in root ProjectDir and if I open for example file1.cpp from SrcDir1, vim can't locate Makefile and I HAVE TO SWITCH TO ANOTHER BUFFER which contains some source from ProjectDir in order to compile program... Is there any opportunity to solve this situation. I have to recompile project very often while debug sessions, and there is really huge dir hierarchy... You can map a key to the sequence 'cd PROJDIR | make ' I think this is the simplest solution. Alternatively, I have in my vimrc a mapping that unsets 'acd' (which is equivalent of 'autocmd BufEnter * :cd %:p:h') and chdirs to the directory that was current when vim started (in all windows). Yakov
Re: Overview of diretories of $HOME/.vim
* A.J.Mechelynck [EMAIL PROTECTED]: ~/.vim/autoload/*.vim load-on-demand scripts for functions of the form scriptname#Funcname() ~/.vim/colors/*.vim colorschemes [...] Great list! Thank you very much! Kai -- * http://www.glorybox.de/ PGP 1024D/594D4132 B693 5073 013F 7F56 5DCC D9C2 E6B5 448C 594D 4132
Insert mode and arrow keys philosophy
Hi folks! AFAIK usage of arrow keys in vim should be avoided at all costs since h/j/k/l allows one to be more efficient in command mode. But how about insert mode? Should one avoid using arrow keys in insert mode as well and switch to command mode and then back to insert mode instead? -- Best regards, Pavel
Re: Insert mode and arrow keys philosophy
I agree that using h/j/k/l is most efficient and its hard to follow them in insert mode. But, if you are aware of the command CTRL-O in insert mode that will get you to a temporary-normal mode, you can execute one normal mode command, after which you will be taken back to insert mode. Once you are in normal mode, you could use [count] w/b/W/B commands, instead of h/j/k/l, if that is appropriate. On 2/20/07, Pavel Shevaev [EMAIL PROTECTED] wrote: Hi folks! AFAIK usage of arrow keys in vim should be avoided at all costs since h/j/k/l allows one to be more efficient in command mode. But how about insert mode? Should one avoid using arrow keys in insert mode as well and switch to command mode and then back to insert mode instead? -- Best regards, Pavel
Re: Insert mode and arrow keys philosophy
On 2/20/07, Pavel Shevaev [EMAIL PROTECTED] wrote: Hi folks! AFAIK usage of arrow keys in vim should be avoided at all costs at all costs sounds too fanatic to me. When keyboard has arrows, I really prefer arrows now, even though I've been using vi since 1989. Can you clarify which costs you are willing to pay/sacrifice to avoid use of arrows ? Yakov
Re: Cursor position - file history
On (03:09 20/02/07), Yakov Lerner [EMAIL PROTECTED] put forth the proposition: On 2/20/07, David Woodfall [EMAIL PROTECTED] wrote: Is there any way of getting vim to remember more previously opened file cursor positions? Searching for history only yields command history. -- It's easier to get forgiveness for being wrong than forgiveness for being right. Try set viminfo='200,50,s10,:20,h set viminfo='300,50,s10,:20,h set viminfo='500,50,s10,:20,h :help 'viminfo' Yakov Nice. Thanks. -- There are very few personal problems that cannot be solved through a suitable application of high explosives. Cheers! Dave
Marking an undo-block before ^U in insert-mode
I'm trying to find a good way to remap control+U in insert-mode so that it begins an undo-block. There are times when type control+U in insert-mode and it doesn't do what I intend, or I want to undo it, only to find that an undo doesn't solve the problem. I know that transitioning out of insert-mode (via esc or c-o) will mark a point in the undo-stack. However, I don't really want to be in insert mode. I've tried the following: inoremap c-u c-oescc-u This does a funky beep/flash (depending on VB settings) and doesn't behave quite like I would have expected it to. inoremap c-u c-onopc-u This gives me a crazy E486: Pattern not found: insert which, I haven't searched for the word insert so this one makes me scratch my head. Bug perhaps? Vim-internals showing through? Have I overlooked some setting that I couldn't find in undo.txt? Or does anyone else have a good suggestion on how to tag a control+U in insert-mode so that it alone can be undone? Thanks, -tim
Re: Insert mode and arrow keys philosophy
Can you clarify which costs you are willing to pay/sacrifice to avoid use of arrows ? Actually I'm just trying to follow the best vim practices and it's really hard for me to get used to h/j/k/l combination after working with some other text editors. That's why I'm asking how vim gurus work the most efficient way in insert mode... BTW, i type English symbols without looking at the keyboard(we call it blind typing in Russia) and the basic position of my right hand is on j/k/l/; buttons, that's why it's kinda hard to get used to switch to h/j/k/l position. I wonder if anybody remaps h/j/k/l = j/k/l/; and ; = h ;) Yakov -- Best regards, Pavel
Re: Marking an undo-block before ^U in insert-mode
On 2/20/07, Tim Chase [EMAIL PROTECTED] wrote: I'm trying to find a good way to remap control+U in insert-mode so that it begins an undo-block. There are times when type control+U in insert-mode and it doesn't do what I intend, or I want to undo it, only to find that an undo doesn't solve the problem. I know that transitioning out of insert-mode (via esc or c-o) will mark a point in the undo-stack. However, I don't really want to be in insert mode. I've tried the following: inoremap c-u c-oescc-u This does a funky beep/flash (depending on VB settings) and doesn't behave quite like I would have expected it to. inoremap c-u c-onopc-u This gives me a crazy E486: Pattern not found: insert which, I haven't searched for the word insert so this one makes me scratch my head. Bug perhaps? Vim-internals showing through? Have I overlooked some setting that I couldn't find in undo.txt? Or does anyone else have a good suggestion on how to tag a control+U in insert-mode so that it alone can be undone? Hello Tim, I am not sure I understand you right, but do you mean somthing like c-gu in insert mode ? (:help i_CTRL-G_u): :imap c-u c-gu ? :help i_CTRL-G_u CTRL-G u...break undo sequence, start new change.. *i_CTRL-G_u* Yakov
Re: Insert mode and arrow keys philosophy
On 2/20/07, Pavel Shevaev [EMAIL PROTECTED] wrote: Can you clarify which costs you are willing to pay/sacrifice to avoid use of arrows ? Actually I'm just trying to follow the best vim practices and it's really hard for me to get used to h/j/k/l combination after working with some other text editors. That's why I'm asking how vim gurus work the most efficient way in insert mode... BTW, i type English symbols without looking at the keyboard(we call it blind typing in Russia) and the basic position of my right hand is on j/k/l/; buttons, that's why it's kinda hard to get used to switch to h/j/k/l position. I wonder if anybody remaps h/j/k/l = j/k/l/; and ; = h ;) If you ask me, I advise you to feel free to use arrows in any mode. Arrows not working in insert mode was the worst annoyance of the original vi, as far as I remember. Yakov Yakov
Re: Insert mode and arrow keys philosophy
Hi, Insert mode is to insert something in your text. If you want to move again, just hit ESC and you'll be back in motion mode. The idea behind using h/j/k/l is to avoid moving your hand/wrist too often while going back and forth between your keyboard and the arrow set (although the use of h/j/k/l might have originated for other reasons back in the old 'vi' days). If you touchtype, just hit ESC and stick with h/j/k/l as often as you can, using arrows will waste your time. If you don't touchtype, you won't really 'get' how great h/j/k/l is so don't worry too much about it and use the arrows whenever you want it. Laurent Yakov Lerner wrote: On 2/20/07, Pavel Shevaev [EMAIL PROTECTED] wrote: Can you clarify which costs you are willing to pay/sacrifice to avoid use of arrows ? Actually I'm just trying to follow the best vim practices and it's really hard for me to get used to h/j/k/l combination after working with some other text editors. That's why I'm asking how vim gurus work the most efficient way in insert mode... BTW, i type English symbols without looking at the keyboard(we call it blind typing in Russia) and the basic position of my right hand is on j/k/l/; buttons, that's why it's kinda hard to get used to switch to h/j/k/l position. I wonder if anybody remaps h/j/k/l = j/k/l/; and ; = h ;) If you ask me, I advise you to feel free to use arrows in any mode. Arrows not working in insert mode was the worst annoyance of the original vi, as far as I remember. Yakov Yakov
Re: indexing in a latex file
On Mon, 19 Feb 2007, C.G.Senthilkumar. apparently wrote: Is there a script or some mechanism to do this effeciently? For example, when I search a term, vim should take the cursor to the term and prompt a confirmation(y/n) to index that term. Upon (y) it should include \index{search_term}. After y/n, it should take me to the next occurence until the end of the file. :s/\search_term\/\\index{}/gc hth, Alan Isaac
Re: Cursor position - file history
David Woodfall wrote: Is there any way of getting vim to remember more previously opened file cursor positions? Searching for history only yields command history. From :help jumplist: there is a separate list per window; the number of entries is fixed at 100. Best regards, Tony. -- Whenever anyone says, theoretically, they really mean, not really. -- Dave Parnas
Re: perl questioin.
Matthew Winn wrote: On Mon, 19 Feb 2007 23:28:08 -0800, ayoub890 [EMAIL PROTECTED] wrote: I am running a perl script in a command inside make. I am trying to pass an environment variable to perl, modify it inside perl and see it changed inside make after returning from the perl script. What is happening is that perl see the environment variable and tries to modify it but make sees no change in the value of the environment variable after return from the perl script. Can someone tell me what I am doing wrong? Environment variables don't work in the way you think they do. They're not global. Each process has its own copy of the environment that is inherited from its parent at the time the process is created. If you change an environment variable in process A and then create a new child process B, both will have the same value for the variable. But now each process can change the variable separately: B's value came from the value that A had at the time B started, but there's no longer any connection between them. If you want to pass a value back from the child to the parent then you have to do it yourself, sending it back on standard output or storing it in a file somewhere and having the parent read it. In a Unix shell, you can do VAR = `command arg1 arg2 arg3` (with backticks) to set environment variable $VAR to the whole stdout output from the command command arg1 arg2 arg3. You might try and see whether it works in make too. Best regards, Tony. -- Oh don't the days seem lank and long When all goes right and none goes wrong, And isn't your life extremely flat With nothing whatever to grumble at!
Re: Reread the file
Bin Chen wrote: Hi, Can VIM configured to reload the opened file in a constant interval? Thanks. ABAI That requires a lot of fancy footwork, because the CursorHold and CursorHoldI events (q.v.) are fired if you don't hit a key for 'updatetime' milliseconds, but not again. Best regards, Tony. -- God doesn't play dice. -- Albert Einstein
Re: Caseless tag matching
Jeenu V wrote: I'm using ctags and I want to do case less matching for tags. I tried setting the 'ignorecase' and 'infercase', but that doesn't give me the actual tag I need to insert. The word, it completes is correct, but they are wholly either in upper case or lower case. Any way to go? Thanks Jeenu There is an option in Exuberant Ctags to generate a case-folded tagfile. See also :help tags-option. Best regards, Tony. -- Any time things appear to be going better, you have overlooked something.
Re: Overview of diretories of $HOME/.vim
There are also some files that are put within the main ~/.vim directory rather than subdirectories. What files would you put in there? Within ~/.vim there filetype.vim scripts.vim You can do the same searches I did by ransacking the help with :helpgrep \~/\.vim/ :copen This will open the quick-fix window with the list of all the hits of ~/.vim/ in the help. You can browse this, copy them elsewhere, and sort or edit them to your heart's content to find out about what files go where. You can also tweak that regexp to things like \.vim/ or \$HOME/[_.]vim/ or other such modifications which may catch other items I've missed. -tim
Re: Insert mode and arrow keys philosophy
Pavel Shevaev wrote: Hi folks! AFAIK usage of arrow keys in vim should be avoided at all costs since h/j/k/l allows one to be more efficient in command mode. But how about insert mode? Should one avoid using arrow keys in insert mode as well and switch to command mode and then back to insert mode instead? There is no at all costs, no dogma in Vim (except maybe about not running the shell in a window). Some people have been taught dactylography from tachers who would severely punish them if they moved their hands, and they still feel guilty if they do. hjkl is for them. Others have learnt it by themselves, maybe after taking piano lessons, and they are still able to move their hands. If they prefer to use arrow keys, why not? Vim often has several different ways of achieving the same goal: use whatever works best for you. Since I use 'wrap' and some of my file have very long lines, I have taken advantage of the :map command to remap the up and down arrow keys to move by screen lines, leaving jk to move by file lines, as follows: map Up gk map Downgj if exists(*pumvisible) inoremap expr Down pumvisible() ? \ltDown : \ltC-Ogj inoremap expr Uppumvisible() ? \ltUp : \ltC-Ogk else inoremapDown C-Ogj inoremapUpC-Ogk endif Now they aren't synonymous anymore, and I use jk (in Normal/Visual mode only, or prefixed by Ctrl-O in Insert mode) or Up Down (in Normal/Visual or Insert/Replace modes) according to where I want to go. Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 49. You never have to deal with busy signals when calling your ISP...because you never log off.
Re: Marking an undo-block before ^U in insert-mode
I'm trying to find a good way to remap control+U in insert-mode so that it begins an undo-block. There are times when type control+U in insert-mode and it doesn't do what I intend, or I want to undo it, only to find that an undo doesn't solve the problem. I know that transitioning out of insert-mode (via esc or c-o) will mark a point in the undo-stack. I am not sure I understand you right, but do you mean something like c-gu in insert mode ? (:help i_CTRL-G_u): :imap c-u c-gu Yes, precisely! Thanks! Or rather, it's the piece I was missing: :inoremap c-u c-guc-u As usual, Vim had the functionality, I just couldn't figure out how to find it in the help. It didn't help that the help only provides the one line you quote for the entirety of assistance on the matter. The whole i_CTRL-G family of commands are new to me. More stuff to learn. ;) I'm still not 100% sure why I got this craziness: inoremap c-u c-onopc-u This gives me a crazy E486: Pattern not found: insert which, I haven't searched for the word insert so this one makes me scratch my head. Bug perhaps? Vim-internals showing through? to try and reproduce something similar, I did vim -u NONE :set nocp :inoremap c-u c-oNopc-u inserted some text and hit control+U. This time I got E35: No previous regular expression. I suspect that the Nop isn't getting interpreted as the do nothing operator as described at :help nop but rather is being interpreted as less-than, en, oh, pee, greater-than and the en portion of it is trying to look for the last regexp. I'm not sure how it thought I looked for insert previously, as I don't consciously remember searching for such text this morning. The docs on nop don't seem to detail that the only permissible context is a stand-alone rhs of a mapping. Ah well. At least I have the CTRL-G_u functionality to solve the problem. Thanks again, -tim
Re: Overview of diretories of $HOME/.vim
Kai Weber wrote: where can I find an overview of the $HOME/.vim directory hierarchie? I have not found an overview, seems I have to read all the vim documentation for :help ftplugin, :help initialization and so on. snip Hello! I have the following help file which I use; see attached. Place it in: .vim/doc Bring up vim, type: :helptags ~/.vim/doc (adjust path as needed) Regards, Chip Campbell *dotvim.txt*The .vim Directory StructureFeb 20, 2007 *.vim-after**.vim-ftplugin* *.vim-plugin* *.vim-doc* *.vim-indent* *.vim-syntax* Copyright: (c) 2004-2007 by Charles E. Campbell, Jr.*dotvim-copyright* The VIM LICENSE applies to dotvim.vim and dotvim.txt (see |copyright|) except use dotvim instead of Vim No warranty, express or implied. Use At-Your-Own-Risk. == 1. The .vim/ directory tree *.vim* *vimfiles* (see also |'runtimepath'|) The user's local plugins and whatnot are stored under: .vim/ Unix vimfiles/ PC,Mac filetype.vim|new-filetype| new filetypes triggered by filename menu.vim|menu.vim| gui menus scripts.vim |new-filetype-scripts| new filetypes triggered by file contents after/compiler/ |write-compiler-plugin| overrule a compiler plugin after/filetype.vim |43.2| overrule filetype after/ftplugin |ftplugin-overrule| overrule filetype settings after loading the global plugin after/plugin user-specified additions to pre-existing plugins after/syntax/ |mysyntaxfile-add| user-specified additions to pre-existing syntax highlighting ex. after/syntax/c.vim autoload/ |autoload| Starting with vim 7.0, scripts can be broken into an always-loaded portion in .vim/plugin and a loaded on demand portion in .vim/autoload. colors/ |:colorscheme| holds colorscheme files compiler/ |:compiler| holds compiler files doc/|write-local-help| |add-local-help| put in your own help files such as this one ftdetect/ |new-filetype| |plugin-filetype| Filetype detection scripts. Note that: set filetype=foo overrules setf foo sets filetype only when not set yet ftplugin/ |write-filetype-plugin| filetype-based plugins (ex. ftplugin/tex/tex.vim) indent/ |filetype-indent-on| |indent-expression| user-specified indenting associated with syntaxfile.vim keymap/ |mbyte-keymap| specify keymap files (multibyte related) lang/ |:menutrans| menu and messages translations plugin/ |write-plugin| |filetype-plugins| |plugin-special| files herein will be loaded automatically at every invocation of vim syntax/ |mysyntaxfile| |new-filetype| new user-specified syntaxfile.vim files spell/ |spell-load| holds dictionaries of words for spell checking systags |ft-c-omni| May be used to help complete system functions tutor/ |tutor| files for vimtutor .vim/after - vim:ts=8:tw=78:ft=help
Re: Reread the file
Bin Chen wrote: Can VIM configured to reload the opened file in a constant interval? Not easily; there's no such configuration options. However, I suspect that there may be two if not more ways to do this: * use an outside process on a multitasking o/s to ping vim using remote_send() would likely work * possibly something can be done with libcall() Regards, Chip Campbell
French characters (how?)
I am using vim over ssh. The remote OS is FreeBSD 6.2 and the local OS is Kubuntu. Both remote and local shells are bash. So far I can write French characters in the shell remotely (mkdir, touch) and when using vim I can write some characters but when I open the file again with vim some words are messed up (some letters, even non-French) are missing. Also when I try to correct the French words it is difficult; vim takes one French character as taking up two characters or I erase one character to only have it replaced by a different character. Can anyone help? PM
Re: French characters (how?)
Peter wrote: I am using vim over ssh. The remote OS is FreeBSD 6.2 and the local OS is Kubuntu. Both remote and local shells are bash. So far I can write French characters in the shell remotely (mkdir, touch) and when using vim I can write some characters but when I open the file again with vim some words are messed up (some letters, even non-French) are missing. Also when I try to correct the French words it is difficult; vim takes one French character as taking up two characters or I erase one character to only have it replaced by a different character. Can anyone help? PM 1. Most of the following applies only to Vim versions with multi-byte (actually, multi-encoding) support: :echo has(multi_byte) should return 1. 2. Make sure that your 'encoding' supports all the characters you need. See: :help 'encoding' :help encoding-names 3. Make sure that your 'termencoding' is set to what your keyboard sends and, in Console Vim, to what your terminal screen understands. The default 'termencoding' value is the empty string, meaning use 'encoding', which is usually OK at startup, but not if you change 'encoding'. Here is a scriptlet to (for instance) set 'encoding' to Unicode: if has(multi_byte) if enc !~? '^u' if already Unicode, no need to change it if tenc == don't clobber the keyboard encoding let tenc = enc endif set enc=utf-8 endif heuristics for existing files set fencs=ucs-bom,utf-8,latin1 defaults for new files setglobal bomb fenc=latin1 else echomsg Warning: multibyte support not compiled-in endif See :help 'termencoding' 3. Make sure that the file's 'fileencoding' is set buffer-locally to the right value. See: :help 'fileencoding' :help 'fileencodings' :help ++opt 4. Some characters may be absent from your keyboard. In that case, you may want to use either digraphs, or the accents keymap. See: :help digraph.txt :help mbyte-keymap Best regards, Tony. -- The bad reputation UNIX has gotten is totally undeserved, laid on by people who don't understand, who have not gotten in there and tried anything. -- Jim Joyce, owner of Jim Joyce's UNIX Bookstore
Re: Marking an undo-block before ^U in insert-mode
* Tim Chase on Tuesday, February 20, 2007 at 09:13:17 -0600: I'm still not 100% sure why I got this craziness: inoremap c-u c-onopc-u This gives me a crazy E486: Pattern not found: insert which, I haven't searched for the word insert so this one makes me scratch my head. Bug perhaps? Vim-internals showing through? to try and reproduce something similar, I did vim -u NONE :set nocp :inoremap c-u c-oNopc-u inserted some text and hit control+U. This time I got E35: No previous regular expression. I suspect that the Nop isn't getting interpreted as the do nothing operator as described at :help nop but rather is being interpreted as less-than, en, oh, pee, greater-than and the en portion of it is trying to look for the last regexp. Try (untested): :inoremap c-u c-oltNopc-u See: :help c -- Vim plugin to paste current GNU Screen buffer in (almost) any mode: http://www.vim.org/scripts/script.php?script_id=1512
Re: Marking an undo-block before ^U in insert-mode
On Tue, 20 Feb 2007 at 9:13am, Tim Chase wrote: I'm trying to find a good way to remap control+U in insert-mode so that it begins an undo-block. There are times when type control+U in insert-mode and it doesn't do what I intend, or I want to undo it, only to find that an undo doesn't solve the problem. I know that transitioning out of insert-mode (via esc or c-o) will mark a point in the undo-stack. I am not sure I understand you right, but do you mean something like c-gu in insert mode ? (:help i_CTRL-G_u): :imap c-u c-gu Yes, precisely! Thanks! Or rather, it's the piece I was missing: :inoremap c-u c-guc-u As usual, Vim had the functionality, I just couldn't figure out how to find it in the help. It didn't help that the help only provides the one line you quote for the entirety of assistance on the matter. The whole i_CTRL-G family of commands are new to me. More stuff to learn. ;) I had the same requirement may be about 6 years ago and had to write a small plugin to do this job. I was essentially mapping the ^U and ^W commands to first save what is going to be deleted and map another key to paste it back. Saving ^U is more useful than ^W and starting a new undo point when you do ^U is probably a reasonable workaround. If you are interested to take a look anyway, the plugin is available at http://www.vim.org/script.php?script_id=150, but a newer version can be downloaded at: http://haridara.googlepages.com/undoins.vim -- Hari I'm still not 100% sure why I got this craziness: inoremap c-u c-onopc-u This gives me a crazy E486: Pattern not found: insert which, I haven't searched for the word insert so this one makes me scratch my head. Bug perhaps? Vim-internals showing through? to try and reproduce something similar, I did vim -u NONE :set nocp :inoremap c-u c-oNopc-u inserted some text and hit control+U. This time I got E35: No previous regular expression. I suspect that the Nop isn't getting interpreted as the do nothing operator as described at :help nop but rather is being interpreted as less-than, en, oh, pee, greater-than and the en portion of it is trying to look for the last regexp. I'm not sure how it thought I looked for insert previously, as I don't consciously remember searching for such text this morning. The docs on nop don't seem to detail that the only permissible context is a stand-alone rhs of a mapping. Ah well. At least I have the CTRL-G_u functionality to solve the problem. Thanks again, -tim Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097
Re: French characters (how?)
Le Mardi 20 Février 2007 11:08, A.J.Mechelynck a écrit : Peter wrote: I am using vim over ssh. The remote OS is FreeBSD 6.2 and the local OS is Kubuntu. Both remote and local shells are bash. So far I can write French characters in the shell remotely (mkdir, touch) and when using vim I can write some characters but when I open the file again with vim some words are messed up (some letters, even non-French) are missing. Also when I try to correct the French words it is difficult; vim takes one French character as taking up two characters or I erase one character to only have it replaced by a different character. Can anyone help? PM 1. Most of the following applies only to Vim versions with multi-byte (actually, multi-encoding) support: :echo has(multi_byte) should return 1. 2. Make sure that your 'encoding' supports all the characters you need. See: :help 'encoding' :help encoding-names 3. Make sure that your 'termencoding' is set to what your keyboard sends and, in Console Vim, to what your terminal screen understands. The default 'termencoding' value is the empty string, meaning use 'encoding', which is usually OK at startup, but not if you change 'encoding'. Here is a scriptlet to (for instance) set 'encoding' to Unicode: if has(multi_byte) if enc !~? '^u' if already Unicode, no need to change it if tenc == don't clobber the keyboard encoding let tenc = enc endif set enc=utf-8 endif heuristics for existing files set fencs=ucs-bom,utf-8,latin1 defaults for new files setglobal bomb fenc=latin1 else echomsg Warning: multibyte support not compiled-in endif See :help 'termencoding' 3. Make sure that the file's 'fileencoding' is set buffer-locally to the right value. See: :help 'fileencoding' :help 'fileencodings' :help ++opt 4. Some characters may be absent from your keyboard. In that case, you may want to use either digraphs, or the accents keymap. See: :help digraph.txt :help mbyte-keymap Best regards, Tony. Thanks. It's going to take me a while to swallow all of that. I'll report back... PM
RE: Insert mode and arrow keys philosophy
If you ask me, I advise you to feel free to use arrows in any mode. Arrows not working in insert mode was the worst annoyance of the original vi, as far as I remember. *Really*? I feel just the opposite, that allowing arrowing when still in insert was more annoying than not, because you *could* successfully arrow around to a different position on the screen, then start typing wwwdw or something, and end up with dw in the text itself, instead of popping over 3 words and deleting the errant word. I keep forgetting to turn that off in the '.vimrc', so mentally have to make a note to keep banging the esc key at regular intervals. :D
Enabling gvim?
I d/l'd and cofigured vim7.x (latest) as follows... ./configure --prefix=/vimpath --enable-gui Should this enable gvim? I did a make install, and cd /vimpath/bin ln -s vim gvim When I start gvim, I get E25: GUI cannot be used: Not enabled at compile time What do I need to do to use gvim? -- Chris T Fouts
Re: Enabling gvim?
[EMAIL PROTECTED] wrote: I d/l'd and cofigured vim7.x (latest) as follows... ./configure --prefix=/vimpath --enable-gui Should this enable gvim? I did a make install, and cd /vimpath/bin ln -s vim gvim When I start gvim, I get E25: GUI cannot be used: Not enabled at compile time What do I need to do to use gvim? -- Chris T Fouts If you're on Windows (as your mail headers seem to imply), you should not use the configure/make method but use the makefile (under src/) appropriate for your compiler. Or you can avail yourself of Steve Hall's builds. On Unix/Linux, you must first make sure that the development packages for everything that gvim uses, including X11 and at least one GUI flavour, are installed on your system. You should also save the make and configure logs (by redirecting stdout and stderr to a file) and check them for errors. See: - Steve Hall's (g)vim for Windows: https://sourceforge.net/project/showfiles.php?group_id=43866package_id=39721 - Compiling Vim on Windows: http://users.skynet.be/antoine.mechelynck/vim/compile.htm - Compiling Vim on Unix: http://users.skynet.be/antoine.mechelynck/vim/compunix.htm Best regards, Tony. -- Measure with a micrometer. Mark with chalk. Cut with an axe.
RE: Enabling gvim?
I did a several gui options ./configure --prefix=/vimpath --enable-gui=auto ./configure --prefix=/vimpath --enable-gui=motif --with-motif-lib=/usr/lib/Motif1.2_R6 ./configure --prefix=/vimpath --enable-gui=X11 --with-x Here's part of the auto/config.log file hostname = deleted uname -m = 9000/785 uname -r = B.10.20 uname -s = HP-UX uname -v = A ... | /* end confdefs.h. */ | #include X11/Xlib.h | int | main () | { | | ; | return 0; | } configure:6694: result: no configure:7029: checking --enable-gui argument configure:7089: result: no GUI support configure:8584: checking for X11/SM/SMlib.h ... I see now what I don't have GUI support. But how do I enable it? -Original Message- From: Theerasak Photha [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 20, 2007 12:25 PM To: Fouts Christopher (QNA RTP PT PREV) Subject: Re: Enabling gvim? On 2/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I d/l'd and cofigured vim7.x (latest) as follows... ./configure --prefix=/vimpath --enable-gui Should this enable gvim? What do I need to do to use gvim? What GUI toolkit did you try to use? Where there any errors during the configuration? Can you use pastebin, rafb, or something of that nature to post the resulting config.log? (Should be in src/auto.)
RE: Enabling gvim?
I have an older version compiled with GUI, so I know it CAN be compiled with gui, but I forgot how... :( VIM - Vi IMproved 6.2 (2003 Jun 1, compiled May 6 2004 11:04:59) Compiled by deleted Normal version with X11-Motif GUI. Features included (+) or not (-): -chris -Original Message- From: Fouts Christopher (QNA RTP PT PREV) Sent: Tuesday, February 20, 2007 12:54 PM To: [EMAIL PROTECTED]; vim@vim.org; [EMAIL PROTECTED] Subject: RE: Enabling gvim? I did a several gui options ./configure --prefix=/vimpath --enable-gui=auto ./configure --prefix=/vimpath --enable-gui=motif --with-motif-lib=/usr/lib/Motif1.2_R6 ./configure --prefix=/vimpath --enable-gui=X11 --with-x Here's part of the auto/config.log file hostname = deleted uname -m = 9000/785 uname -r = B.10.20 uname -s = HP-UX uname -v = A ... | /* end confdefs.h. */ | #include X11/Xlib.h | int | main () | { | | ; | return 0; | } configure:6694: result: no configure:7029: checking --enable-gui argument configure:7089: result: no GUI support configure:8584: checking for X11/SM/SMlib.h ... I see now what I don't have GUI support. But how do I enable it? -Original Message- From: Theerasak Photha [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 20, 2007 12:25 PM To: Fouts Christopher (QNA RTP PT PREV) Subject: Re: Enabling gvim? On 2/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I d/l'd and cofigured vim7.x (latest) as follows... ./configure --prefix=/vimpath --enable-gui Should this enable gvim? What do I need to do to use gvim? What GUI toolkit did you try to use? Where there any errors during the configuration? Can you use pastebin, rafb, or something of that nature to post the resulting config.log? (Should be in src/auto.)
RE: Enabling gvim?
Here's how the older version was compiled and linked... Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF -I/usr/dt/incl ude -I/usr/local/include -g -O2 Linking: gcc -L/usr/dt/lib -L/usr/local/lib -o vim -lXext -lXm -lXt -lX11 -lte rmlib -Original Message- From: Fouts Christopher (QNA RTP PT PREV) Sent: Tuesday, February 20, 2007 12:59 PM To: Fouts Christopher (QNA RTP PT PREV); [EMAIL PROTECTED]; vim@vim.org; [EMAIL PROTECTED] Subject: RE: Enabling gvim? I have an older version compiled with GUI, so I know it CAN be compiled with gui, but I forgot how... :( VIM - Vi IMproved 6.2 (2003 Jun 1, compiled May 6 2004 11:04:59) Compiled by deleted Normal version with X11-Motif GUI. Features included (+) or not (-): -chris -Original Message- From: Fouts Christopher (QNA RTP PT PREV) Sent: Tuesday, February 20, 2007 12:54 PM To: [EMAIL PROTECTED]; vim@vim.org; [EMAIL PROTECTED] Subject: RE: Enabling gvim? I did a several gui options ./configure --prefix=/vimpath --enable-gui=auto ./configure --prefix=/vimpath --enable-gui=motif --with-motif-lib=/usr/lib/Motif1.2_R6 ./configure --prefix=/vimpath --enable-gui=X11 --with-x Here's part of the auto/config.log file hostname = deleted uname -m = 9000/785 uname -r = B.10.20 uname -s = HP-UX uname -v = A ... | /* end confdefs.h. */ | #include X11/Xlib.h | int | main () | { | | ; | return 0; | } configure:6694: result: no configure:7029: checking --enable-gui argument configure:7089: result: no GUI support configure:8584: checking for X11/SM/SMlib.h ... I see now what I don't have GUI support. But how do I enable it? -Original Message- From: Theerasak Photha [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 20, 2007 12:25 PM To: Fouts Christopher (QNA RTP PT PREV) Subject: Re: Enabling gvim? On 2/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I d/l'd and cofigured vim7.x (latest) as follows... ./configure --prefix=/vimpath --enable-gui Should this enable gvim? What do I need to do to use gvim? What GUI toolkit did you try to use? Where there any errors during the configuration? Can you use pastebin, rafb, or something of that nature to post the resulting config.log? (Should be in src/auto.)
OT: Want to sitch from Emacs-based mailprogram to one supporting vim
Hi, sorry of being (may be) off topic. The only reason why Emacs is still installed is, that I am reading and editing mails with the Mail in an Emacs World (mew) program, which is really nice. Now I am looking for one as a replacement. One must-have of the new one is to store the mails in a the same format as mew does, so I can still read my old mails. The other one: It must support vim as close as possible :O) Mew reads from /var/spool/mail/mccramer and put each mail as a single file and not processed in any other ways in a certain folder below $HOME/Mail/. The folder is determined on the base of regular expressions. The mails themselves are fetched from the server by fetchmail/exim. What I am searching for is the terminus technicus of this kind of mail storage format...if there is one. This name would enable me to search for another mail program supporting exactly the same format. I heard a lot of mutt but I am uncertain about its quality and feature and testing always mean to loose a certain amount of mail in a possible different format. It would also be nice, if the mail program would support encryption via gpg. Thank you very much for any helpful hint and/or help regarding this problem ! Keep hacking! mcc
Re: Enabling gvim?
[EMAIL PROTECTED] wrote: I d/l'd and cofigured vim7.x (latest) as follows... ./configure --prefix=/vimpath --enable-gui Should this enable gvim? I did a make install, and cd /vimpath/bin ln -s vim gvim When I start gvim, I get E25: GUI cannot be used: Not enabled at compile time What do I need to do to use gvim? Are you using windoze, linux, or mac? For windows: what compiler are you using? For example: cygwin: make -f Make_cyg.mak M$ visual c: make -f Make_mvc.mak etc. So, it depends on what compiler you're using as to which makefile to use. You can then edit the appropriate makefile for particular options you want. Generally, though, they do come up with gui (gvim). For linux: I use configure --with-features=huge --enable-perlinterp make su make install I've not used the Mac... I suggest trying to get the compile to work as shown above first, and then try again with whatever configure options you want. Make sure that the usual way works first! Regards, Chip Campbell
Re: Insert mode and arrow keys philosophy
Hi Laurent :) * vim [EMAIL PROTECTED] dixit: The idea behind using h/j/k/l is to avoid moving your hand/wrist too often while going back and forth between your keyboard and the arrow set (although the use of h/j/k/l might have originated for other reasons back in the old 'vi' days). Hitting ESC doesn't make your wrist move? I may have a very small hand, but I have to move my left hand for hitting ESC. I suspect that the main reason behind the hjkl (which is very unnatural for me, the arrows have a much better design with the inverted T at least IMHO) was that the first keyboards used to develop/use vi probably hadn't arrow keys, or they were very far at the right of the keyboard. Of course I may be wrong here, I wasn't there ;)) but at least in my case, the most moving I do is *when inserting text* (well, when modifying existing text, to be more precise), and using ESC and the different motion commands slows down my editing a lot. Using the arrow keys and the Home/End, PgUp/PgDn keys makes my editing much faster. I'm a touch typer, and I can find my position again in the keyboard pretty fast, but I find more difficult to do it after hitting ESC than after using the arrow keys. In addition to this, my touch typing position is with my index finger on the 'j', and not the 'h'. To hit 'h' I must displace my index finger and that's slower for motion than having my fingers on the inverted T. Weren't for the ESC key to go to normal mode, I will never use the arrows, just because having the hands in touch typing position is much faster, period. But hitting the ESC key to go to normal mode, hit a couple of keys for doing the movement and hitting 'i' again is slower than keeping in insert mode and using the arrows, at least for me. Probably if I had learnt to use an editor with vi, I will get used to hit the ESC and change modes fast, but I hadn't and now hitting ESC is very unnatural to me, even though I use it in my shell to clean the command line!. It's just a mental attitude, I know, but... What I try to mean with this message is that hjkl is not necessarily faster even if you touch type. Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen!
Re: Insert mode and arrow keys philosophy
DervishD wrote: Hi Laurent :) * vim [EMAIL PROTECTED] dixit: The idea behind using h/j/k/l is to avoid moving your hand/wrist too often while going back and forth between your keyboard and the arrow set (although the use of h/j/k/l might have originated for other reasons back in the old 'vi' days). Hitting ESC doesn't make your wrist move? I may have a very small hand, but I have to move my left hand for hitting ESC. I suspect that the main reason behind the hjkl (which is very unnatural for me, the arrows have a much better design with the inverted T at least IMHO) was that the first keyboards used to develop/use vi probably hadn't arrow keys, or they were very far at the right of the keyboard. Of course I may be wrong here, I wasn't there ;)) but at least in my case, the most moving I do is *when inserting text* (well, when modifying existing text, to be more precise), and using ESC and the different motion commands slows down my editing a lot. Using the arrow keys and the Home/End, PgUp/PgDn keys makes my editing much faster. I'm a touch typer, and I can find my position again in the keyboard pretty fast, but I find more difficult to do it after hitting ESC than after using the arrow keys. In addition to this, my touch typing position is with my index finger on the 'j', and not the 'h'. To hit 'h' I must displace my index finger and that's slower for motion than having my fingers on the inverted T. Weren't for the ESC key to go to normal mode, I will never use the arrows, just because having the hands in touch typing position is much faster, period. But hitting the ESC key to go to normal mode, hit a couple of keys for doing the movement and hitting 'i' again is slower than keeping in insert mode and using the arrows, at least for me. Probably if I had learnt to use an editor with vi, I will get used to hit the ESC and change modes fast, but I hadn't and now hitting ESC is very unnatural to me, even though I use it in my shell to clean the command line!. It's just a mental attitude, I know, but... What I try to mean with this message is that hjkl is not necessarily faster even if you touch type. Raúl Núñez de Arenas Coronado If the Esc key is too far, you may try using Ctrl-[ instead -- Vim sees it as Esc. Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 50. The last girl you picked up was only a jpeg.
RE: Enabling gvim?
It's in HPUX, and 10.20 at that. but I'll try your --with-features option. -Original Message- From: Charles E Campbell Jr [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 20, 2007 1:52 PM To: Fouts Christopher (QNA RTP PT PREV) Cc: vim@vim.org Subject: Re: Enabling gvim? [EMAIL PROTECTED] wrote: I d/l'd and cofigured vim7.x (latest) as follows... ./configure --prefix=/vimpath --enable-gui Should this enable gvim? I did a make install, and cd /vimpath/bin ln -s vim gvim When I start gvim, I get E25: GUI cannot be used: Not enabled at compile time What do I need to do to use gvim? Are you using windoze, linux, or mac? For windows: what compiler are you using? For example: cygwin: make -f Make_cyg.mak M$ visual c: make -f Make_mvc.mak etc. So, it depends on what compiler you're using as to which makefile to use. You can then edit the appropriate makefile for particular options you want. Generally, though, they do come up with gui (gvim). For linux: I use configure --with-features=huge --enable-perlinterp make su make install I've not used the Mac... I suggest trying to get the compile to work as shown above first, and then try again with whatever configure options you want. Make sure that the usual way works first! Regards, Chip Campbell
Re: indexing in a latex file
:s/\search_term\/\\index{}/gc This, with some more fudging with the replace string seems to serve my purpose for now. Thank You. However, I was wondering if there was already some sophisticated script or function written for this purpose explicitly that can handle all the various situations that may arise when indexing with Latex. I came to know that Emacs has something like that. So, my mind just blanked out on using :s// Thanks Senthil.
Re: Marking an undo-block before ^U in insert-mode
:help nop but rather is being interpreted as less-than, en, oh, pee, greater-than and the en portion of it is trying to look for the last regexp. Try (untested): :inoremap c-u c-oltNopc-u This is the behavior I _see_, but that I understood having nop should send a no-op keycode. Thus, I had understood the mapping :inoremap c-u c-onopc-u would act like typing control+O [no-op character that clears the control-O (insert) mode] control+U. This is the behavior I had expected. What you propose would act like typing control+O less-than en oh pee greater-than control+U. This is the behavior I see. The i_CTRL-G_u did what I wanted. Thanks though, -tim
RE: Enabling gvim?
Ok, how do I tell ./configure where X11 include/lib dirs are? I tried the --x-includes=DIR and --x-libraries=DIR to no avail. Seems like it can't find them so it throws away gui support. -Original Message- From: Fouts Christopher (QNA RTP PT PREV) Sent: Tuesday, February 20, 2007 2:21 PM To: [EMAIL PROTECTED] Cc: vim@vim.org Subject: RE: Enabling gvim? It's in HPUX, and 10.20 at that. but I'll try your --with-features option. -Original Message- From: Charles E Campbell Jr [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 20, 2007 1:52 PM To: Fouts Christopher (QNA RTP PT PREV) Cc: vim@vim.org Subject: Re: Enabling gvim? [EMAIL PROTECTED] wrote: I d/l'd and cofigured vim7.x (latest) as follows... ./configure --prefix=/vimpath --enable-gui Should this enable gvim? I did a make install, and cd /vimpath/bin ln -s vim gvim When I start gvim, I get E25: GUI cannot be used: Not enabled at compile time What do I need to do to use gvim? Are you using windoze, linux, or mac? For windows: what compiler are you using? For example: cygwin: make -f Make_cyg.mak M$ visual c: make -f Make_mvc.mak etc. So, it depends on what compiler you're using as to which makefile to use. You can then edit the appropriate makefile for particular options you want. Generally, though, they do come up with gui (gvim). For linux: I use configure --with-features=huge --enable-perlinterp make su make install I've not used the Mac... I suggest trying to get the compile to work as shown above first, and then try again with whatever configure options you want. Make sure that the usual way works first! Regards, Chip Campbell
Re: Marking an undo-block before ^U in insert-mode
Tim Chase wrote: :help nop but rather is being interpreted as less-than, en, oh, pee, greater-than and the en portion of it is trying to look for the last regexp. Try (untested): :inoremap c-u c-oltNopc-u This is the behavior I _see_, but that I understood having nop should send a no-op keycode. Thus, I had understood the mapping :inoremap c-u c-onopc-u would act like typing control+O [no-op character that clears the control-O (insert) mode] control+U. This is the behavior I had expected. What you propose would act like typing control+O less-than en oh pee greater-than control+U. This is the behavior I see. The i_CTRL-G_u did what I wanted. Thanks though, -tim A little experimenting shows that Nop is only interpreted as do-nothing when it is the _whole_ {rhs} of the mapping, as in :map F6 Nop ; and in this case, :map F6 will print the Nop in blue (or in whatever colour your clourscheme assigns to the SpecialKey group). If it is not alone, as in :map F6 NopNop it is displayed in black (or in the Normal highlight colour) and means less-than, N-for-November, o-for-Oscar, p-for-Papa, greater-than. Best regards, Tony. -- If only one could get that wonderful feeling of accomplishment without having to accomplish anything.
Re: Enabling gvim?
[EMAIL PROTECTED] wrote: Ok, how do I tell ./configure where X11 include/lib dirs are? I tried the --x-includes=DIR and --x-libraries=DIR to no avail. Seems like it can't find them so it throws away gui support. Do you have the _header_ files for _compiling_ with X11 installed? On my system there are a lot of *.h files in /usr/include/X11/ Best regards, Tony. -- There once was a queen of Bulgaria Whose bush had grown hairier and hairier, Till a prince from Peru Who came up for a screw Had to hunt for her cunt with a terrier.
Re: Enabling gvim?
On 2007-02-20, [EMAIL PROTECTED] wrote: It's in HPUX, and 10.20 at that. but I'll try your --with-features option. I don't know how standard the HP-UX 10.20 installation I use is, but I built vim-7.0 without any problems using these commands: cd ~/src/vim-7.0 bzcat vim-7.0.tar.bz2 | tar xf - cd vim70 ./configure --prefix=$HOME/src/vim-7.0 --with-tlib=curses --enable-cscope make make install The output of 'vim --version' is: VIM - Vi IMproved 7.0 (2006 May 7, compiled Aug 28 2006 11:48:07) Included patches: 1-66 Compiled by [EMAIL PROTECTED] Normal version with GTK GUI. Features included (+) or not (-): -arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +folding -footer +fork() -gettext -hangul_input -iconv +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse +mouseshape -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm +mouse_xterm -multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +postscript +printer -profile -python +quickfix +reltime -rightleft -ruby +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save system vimrc file: $VIM/vimrc user vimrc file: $HOME/.vimrc user exrc file: $HOME/.exrc system gvimrc file: $VIM/gvimrc user gvimrc file: $HOME/.gvimrc system menu file: $VIMRUNTIME/menu.vim fall-back for $VIM: /home/garyjohn/src/vim-7.0-patched/share/vim Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/opt/TWWfsw/gtk+12/include/gtk-1.2 -I/opt/TWWfsw/glib12/include/glib-1.2 -I/opt/TWWfsw/glib12/lib/glib/include -I/usr/contrib/X11R6/include -I/usr/include/X11R6 -g -O2 Linking: gcc -L/usr/local/lib -o vim -L/opt/TWWfsw/gtk+12/lib -Wl,+s,+b,/opt/TWWfsw/gtk+12/lib -L/usr/contrib/X11R6/lib -lgtk -lgdk -L/opt/TWWfsw/glib12/lib -Wl,+s,+b,/opt/TWWfsw/glib12/lib -Wl,-E -lgmodule -lglib -ldld -lXext -lm -lXt -lcurses Note that I have omitted the steps necessary to bring the original source up to patch level 66, but that should have no effect on being able to build a GUI version. Note also that --prefix and --enable-cscope shouldn't affect your build, but it may be necessary to use --with-tlib=curses in order to use a color terminal. In other words, I didn't have to do anything special to get a working gvim. HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA
RE: Insert mode and arrow keys philosophy
I suspect that the main reason behind the hjkl (which is very unnatural for me, the arrows have a much better design with the inverted T at least IMHO) was that the first keyboards used to develop/use vi probably hadn't arrow keys, or they were very far at the right of the keyboard. Pretty much so. Early dumbterminals (think ADM-3a and similar critters) didn't have arrow keys, but they *did* go so far as to have little arrow marks on the keycaps themselves, underneath the letters, on -- you guessed it -- h/j/k/l. The reason for that is similar to subdued numbers/characters on keycaps on laptops and the like, where there's no separate numeric keypad, so you hit numlock or Fn or whatever your laptop has, and those keys send the char in the subdued text instead of the char they normally send. Hit *control* instead, for ^H (backspace), ^J (linefeed), ^K (vertical tab), and ^L (formfeed), and you get the cursor motions left/down/up/right, respectively. If you recall the old termcaps/terminfo entries for such critters, you'd see usually the same values for cub1/kcub1, cud1/kcud1, cuu1/kcuu1, and cuf1/kcuf1, as ^H/^J/^K/^L. Only later with discrete arrow keys did you start getting ANSIish escape sequences like \[[A/\[[B/\[[C/\[[D. Gawd, I feel old...
RE: Enabling gvim?
-Original Message- From: Ryan Phillips [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 20, 2007 4:25 PM To: Fouts Christopher (QNA RTP PT PREV) Cc: vim@vim.org Subject: Re: Enabling gvim? [EMAIL PROTECTED] said: I d/l'd and cofigured vim7.x (latest) as follows... ./configure --prefix=/vimpath --enable-gui Should this enable gvim? I did a make install, and cd /vimpath/bin ln -s vim gvim When I start gvim, I get E25: GUI cannot be used: Not enabled at compile time What do I need to do to use gvim? I believe you are missing the GUI headers/libraries of the toolkit you are using. I compile gvim on linux with: ./configure --enable-features=huge --prefix=/usr/local/vim \ --enable-cscope --with-x --enable-gui=gtk2 --with-vim-name=gvim The file in src/auto/config.log will probably help out. -Ryan Ok thanks. Looks like we don't have the X11/Motif libraries, which I've used before. Someone else configured this machine. -chris
RE: Enabling gvim?
(snip) Ok thanks. Looks like we don't have the X11/Motif libraries, which I've used before. Someone else configured this machine. -chris Actually we have the Motif libs, but I can't find the include files. -chris
Re: indenting and json
On Tue, Feb 20, 2007 at 02:08:31AM -0300, g b wrote: On 2/19/07, Marc Weber [EMAIL PROTECTED] wrote: On Sat, Feb 17, 2007 at 09:57:57PM -0200, g b wrote: Any way to indent json correctly on vim? Obj = { att1: 'val1', att2: 'val2', } I don't know. But it shouldn't be that hard to use folding on { } and set indentexpr to a function returning folding level... This might get close to what you want obj = { att1:'bal', att2:'asd', This is the current indenting i get with vim7.0.35 It puts two extra tabs after the first attribute. the main issue is not with the {}s. Gabriel I was thinking of syn region myFold start={ end=} transparent fold syn sync fromstart set foldmethod=syntax set indentexpr=foldlevel(line('.')) but this does only work if you write it this way: obj = { att1:'bal', att2:'asd', } But its not so hard writing your own indenting function. Just use motion [{ again and again to find outer most { and count them. This is your indentation level. Wrap this into a function and assign this to indentexpr.. You can use getpos() to see wether cursor has changed. Marc
[Fwd: Re: Insert mode and arrow keys philosophy]
Apparently the original message was bounced by the listbot. Best regards, Tony. Original Message Subject:Re: Insert mode and arrow keys philosophy Date: Tue, 20 Feb 2007 11:58:45 -0800 From: Raimon Grau [EMAIL PROTECTED] To: A.J.Mechelynck [EMAIL PROTECTED] CC: vim [EMAIL PROTECTED], VIM mail list vim@vim.org References: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] On 2/20/07, *A.J.Mechelynck* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: DervishD wrote: Hi Laurent :) * vim [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] dixit: The idea behind using h/j/k/l is to avoid moving your hand/wrist too often while going back and forth between your keyboard and the arrow set (although the use of h/j/k/l might have originated for other reasons back in the old 'vi' days). Hitting ESC doesn't make your wrist move? I may have a very small hand, but I have to move my left hand for hitting ESC. I suspect that the main reason behind the hjkl (which is very unnatural for me, the arrows have a much better design with the inverted T at least IMHO) was that the first keyboards used to develop/use vi probably hadn't arrow keys, or they were very far at the right of the keyboard. Of course I may be wrong here, I wasn't there ;)) but at least in my case, the most moving I do is *when inserting text* (well, when modifying existing text, to be more precise), and using ESC and the different motion commands slows down my editing a lot. Using the arrow keys and the Home/End, PgUp/PgDn keys makes my editing much faster. I'm a touch typer, and I can find my position again in the keyboard pretty fast, but I find more difficult to do it after hitting ESC than after using the arrow keys. In addition to this, my touch typing position is with my index finger on the 'j', and not the 'h'. To hit 'h' I must displace my index finger and that's slower for motion than having my fingers on the inverted T. Weren't for the ESC key to go to normal mode, I will never use the arrows, just because having the hands in touch typing position is much faster, period. But hitting the ESC key to go to normal mode, hit a couple of keys for doing the movement and hitting 'i' again is slower than keeping in insert mode and using the arrows, at least for me. Probably if I had learnt to use an editor with vi, I will get used to hit the ESC and change modes fast, but I hadn't and now hitting ESC is very unnatural to me, even though I use it in my shell to clean the command line!. It's just a mental attitude, I know, but... What I try to mean with this message is that hjkl is not necessarily faster even if you touch type. Raúl Núñez de Arenas Coronado If the Esc key is too far, you may try using Ctrl-[ instead -- Vim sees it as Esc. Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 50. The last girl you picked up was only a jpeg. One of my most precious maps is imap jk esc imap jj esc provided you don't have any other imap that starts with jj or jk (you will have to wait for the timeout), and you don't type words with that two letters next to other (I doubt spanish has any) it's very handy. Best regards from Spain
Re: The Seven Habits Of Effective Text Editing 2
Kim Schulz 写道: On Mon, 19 Feb 2007 23:11:16 +0100 Bram Moolenaar [EMAIL PROTECTED] wrote: Yongwei Wu wrote: Bin Chen wrote: Thanks. I am also looking forward to this talk. But unfortunately the google video is blocked in some countries, could some one put the video to the vim official site? and this can make this video seems more official ^^. From what countries is the video blocked? Or is it that all of Google video is blocked? The message I got was: Thanks for your interest in Google Video. Currently, the playback feature of Google Video isn't available in your country. We hope to make this feature available more widely in the future, and we really appreciate your patience. I am in China. I am not sure which countries have similar problems. Maybe you can get this kind of information, Bram? I'll ask if I can get the video in a portable format and put it on the Vim ftp server. http://www.schulz.dk/vim/7HabitsForEffectiveT.avi Thank you! I am downloading now...
changing font size with scroll
I would like to increase/decrease the font size by one when i hold down ctrl and scroll the wheel. is this possible?
Re: changing font size with scroll
Simon Jackson wrote: I would like to increase/decrease the font size by one when i hold down ctrl and scroll the wheel. is this possible? It may be possible, but not easy, since the font size must be extracted from the 'guifont' option, and the latter has 5 incompatible formats, viz. GTK+2, kvim (obsolete, but some versions are still around), Photon, other-X11 and other. Each version of gvim accepts only one of these, and some have the size at the end, others have it in the middle, and for a few it can be either. So you would need to: (1) construct a function to: (1a) extract the size from the 'guifont' depending on the current version and platform; (1b) increase or decrease the size by 10 (ten tenths of a point) for other-X11, or by 1 (1pt) on other GUI flavours (1c) reconstruct the new 'guifont' value (2) make mappings for C-MouseUp and C-MouseDown to call said function with an argument of +1 or -1 It would be much easier to directly edit the 'guifont' on the command-line, using :set guifont=Tab where Tab means hit the Tab key: when you hit Tab, Vim will fill in the current value with escaping backslashes if and where needed; you can then edit it in-place, then hit Enter to accept the changes or Esc to reject the changes. Here are the possible formats: has(gui_gtk2) :set gfn=Andale\ Mono\ 11 11pt Andale Mono has(gui_kde) :set gfn=BH\ LucidaTypewriter/9/-1/5/50/0/0/0/1/0 9pt BH LucidaTypewriter has(gui_photon) :set gfn=Courier:s10 10pt Courier has(x11) !(has(gui_gtk2) || has(gui_kde) || has(gui_photon)) :set gfn=-*-lucidatypewriter-medium-r-normal-*-*-95-*-*-m-*-* 9.5pt LucidaTypewriter !has(x11) :set gfn=Courier_New:h12:cDEFAULT 12pt Courier New Best regards, Tony. -- Pity the meek, for they shall inherit the earth. -- Don Marquis
Recording of Vim presentation available
Dear Vim users, A week ago I did a presentation on Vim, called Seven habits of effective text editing 2.0. I was happy to see a lot of people come to listen to me. Many more than expected, we ran out of food and had to get extra chairs. Thanks to all who were there, it was nice to have a big audience. And I was excited to greet some of the people who I previously only knew through e-mail. The video of the presentation is now available on Google video: http://video.google.com/videoplay?docid=2538831956647446078 The presentation itself is about 45 minutes. With the QA included it is 80 minutes. If you can't use Google video, you may get the video file from the ftp server: ftp://ftp.vim.org/pub/vim/stuff/7Habits20.avi This is 507 Mbyte of divx. You may want to use a mirror site: ftp://ftp.vim.org/pub/vim/MIRRORS It's a lot quicker to get the PDF with the presentation and notes: http://www.moolenaar.net/habits.pdf This is about 640 Kbyte. -- hundred-and-one symptoms of being an internet addict: 163. You go outside for the fresh air (at -30 degrees) but open the window first to hear new mail arrive. /// 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: Insert mode and arrow keys philosophy
Hi Gene :) * Gene Kwiecinski [EMAIL PROTECTED] dixit: I suspect that the main reason behind the hjkl (which is very unnatural for me, the arrows have a much better design with the inverted T at least IMHO) was that the first keyboards used to develop/use vi probably hadn't arrow keys, or they were very far at the right of the keyboard. Pretty much so. Early dumbterminals (think ADM-3a and similar critters) didn't have arrow keys, but they *did* go so far as to have little arrow marks on the keycaps themselves, underneath the letters, on -- you guessed it -- h/j/k/l. I did see this in an old Ultrix terminal. Don't ask me which model, because this was back in the university and I don't remember. I just remember vi from that machine and was very painful. I was used to boxer, a DOS editor (very powerful for 1992, I must say), so original vi didn't fit my expectations ;)) Hit *control* instead, for ^H (backspace), ^J (linefeed), ^K (vertical tab), and ^L (formfeed), and you get the cursor motions left/down/up/right, respectively. Thanks! I always wondered why those letters where control chars for movements (or quasi-movements) :)) Gawd, I feel old... Me too XDD Nice answer, you've provided a couple of very useful information, at least for me (I'm *very* curious) ;) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen!
Re: [Fwd: Re: Insert mode and arrow keys philosophy]
Hi Tony :) * A.J.Mechelynck [EMAIL PROTECTED] dixit: to hit the ESC and change modes fast, but I hadn't and now hitting ESC is very unnatural to me, even though I use it in my shell to clean the command line!. If the Esc key is too far, you may try using Ctrl-[ instead -- Vim sees it as Esc. Worst for me: I have to move both hands: Ctrl is... well, Ctrl, too low, and my [ key is on the far right and, normally, it would need Alt-Gr to be pressed. I prefer the mappings you've posted below ;))) One of my most precious maps is imap jk esc imap jj esc provided you don't have any other imap that starts with jj or jk (you will have to wait for the timeout), and you don't type words with that two letters next to other (I doubt spanish has any) it's very handy. I don't use any language with something like 'jk' or 'jj' (although I've written that combination some times in *this* thread!), so they fit pretty well and avoids me hitting ESC. Sometimes I just forget how powerful are vim mappings. It doesn't seem natural to me to map letters in insert mode O:))) Thanks for your help, as always! Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen!
[correction] Recording of Vim presentation available
I wrote: It's a lot quicker to get the PDF with the presentation and notes: http://www.moolenaar.net/habits.pdf This is about 640 Kbyte. But that's the old one! Use this link instead: http://www.moolenaar.net/habits_2007.pdf Oh, and in case you are interested in the books mentioned, use this link: http://iccf-holland.org/click2.html Sorry for the confusion. -- hundred-and-one symptoms of being an internet addict: 168. You have your own domain name. /// 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///