Re: breakindent, take 2
What do you think? I prefer (c) from implementation, efficiency and intuitivity perspective. I agree. Strongly. Based on popular demand, this patch implements, in addition, 'breakindentshift' (brishift). It seems to work well, report problems. And please suggestions for some shorter names: breakindent is already long enough, breakindentshift is not nice at all. Vaclav Index: runtime/doc/eval.txt === --- runtime/doc/eval.txt (revision 296) +++ runtime/doc/eval.txt (working copy) @@ -5262,8 +5262,8 @@ keymap Compiled with 'keymap' support. langmap Compiled with 'langmap' support. libcall Compiled with |libcall()| support. -linebreak Compiled with 'linebreak', 'breakat' and 'showbreak' - support. +linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and + 'breakindent' support. lispindent Compiled with support for lisp indenting. listcmds Compiled with commands for the buffer list |:files| and the argument list |arglist|. Index: runtime/doc/options.txt === --- runtime/doc/options.txt (revision 296) +++ runtime/doc/options.txt (working copy) @@ -1145,6 +1145,39 @@ break if 'linebreak' is on. Only works for ASCII and also for 8-bit characters when 'encoding' is an 8-bit encoding. + + *'breakindent'* *'bri'* +'breakindent' 'bri' boolean (default off) + local to window + {not in Vi} + {not available when compiled without the |+linebreak| + feature} + Every wrapped line will continue visually indented (same amount of + space as the beginning of that line), thus preserving horizontal blocks + of text. + + *'breakindentmin'* *'brimin'* +'breakindentmin' 'brimin' number (default 20) + local to window + {not in Vi} + {not available when compiled without the |+linebreak| + feature} + Minimum text width that will be kept after applying 'breakindent', + even if the resulting text should normally be narrower. This prevents + text indented almost to the right window border oocupying lot of + vertical space when broken. + + *'breakindentshift'* *'brishift'* +'breakindentshift' 'brishift' number (default 20) + local to window + {not in Vi} + {not available when compiled without the |+linebreak| + feature} + After applying 'breakindent', wrapped line beginning will be shift by + given number of characters. It permits dynamic French paragraph + indentation (negative) or emphasizing the line continuation + (positive). + *'browsedir'* *'bsdir'* 'browsedir' 'bsdir' string (default: last) global @@ -4227,12 +4260,13 @@ {not in Vi} {not available when compiled without the |+linebreak| feature} - If on Vim will wrap long lines at a character in 'breakat' rather + If on, Vim will wrap long lines at a character in 'breakat' rather than at the last character that fits on the screen. Unlike 'wrapmargin' and 'textwidth', this does not insert EOLs in the file, - it only affects the way the file is displayed, not its contents. The - value of 'showbreak' is used to put in front of wrapped lines. - This option is not used when the 'wrap' option is off or 'list' is on. + it only affects the way the file is displayed, not its contents. + If 'breakindent' is set, line is visually indented. Then, the value + of 'showbreak' is used to put in front of wrapped lines. This option + is not used when the 'wrap' option is off or 'list' is on. Note that Tab characters after an EOL are mostly not displayed with the right amount of white space. Index: runtime/optwin.vim === --- runtime/optwin.vim (revision 296) +++ runtime/optwin.vim (working copy) @@ -329,6 +329,15 @@ call append($, linebreak\twrap long lines at a character in 'breakat') call append($, \t(local to window)) call SIDBinOptionL(lbr) +call append($, breakindent\tpreserve indentation in wrapped text) +call append($, \t(local to window)) +call SIDBinOptionL(bri) +call append($, breakindentmin\tminimum text width after indent in 'breakindent') +call append($, \t(local to window)) +call SIDOptionL(brimin) +call append($, breakindentshift\tshift beginning of 'breakindent'ed line by this number of characters (negative left)) +call append($, \t(local to window)) +call SIDOptionL(brishift) call append($, breakat\twhich characters might cause a line break) call SIDOptionG(brk, brk) call append($, showbreak\tstring to put before wrapped screen lines) Index: src/ex_cmds.c === --- src/ex_cmds.c (revision 296) +++ src/ex_cmds.c (working copy) @@ -260,7 +260,7 @@ ; save = *last; *last = NUL; -len = linetabsize(line); /* get line length */ +len = linetabsize(line, curwin-w_cursor.lnum); /* get line length */ if (has_tab != NULL) /* check for embedded TAB */ *has_tab = (vim_strrchr(first, TAB) !=
[ANN] vimgdb 1.11
Hi all Vimgdb 1.11 is a port of vimgb to Vim 7.1. Vimgdb is a vim patch implemented as a vim optional feature that provides full gdb support in the vim editor: breakpoints, watch variables, gdb command completion, assembly windows, etc. You can get vimgdb from http://clewn.sourceforge.net. Xavier -- http://clewn.sourceforge.net gdb support in Vim
Re: Tear off this menu in messages-history
To Yongwei: Does this patch solve your problem? To Bram: Please consider adding this patch. I think it is really a bug. Index: src/gui_w32.c === --- src/gui_w32.c (revision 296) +++ src/gui_w32.c (working copy) @@ -1051,7 +1051,7 @@ if (pMenu != NULL pMenu-strings[MENU_INDEX_TIP] != 0 GetMenuState(s_menuBar, pMenu-id, MF_BYCOMMAND) != -1) { - msg(pMenu-strings[MENU_INDEX_TIP]); + msg_outtrans(pMenu-strings[MENU_INDEX_TIP]); setcursor(); out_flush(); did_menu_tip = TRUE;
Re: Tear off this menu in messages-history
Hi Edward, On 30/05/07, Edward L. Fox [EMAIL PROTECTED] wrote: To Yongwei: Does this patch solve your problem? To Bram: Please consider adding this patch. I think it is really a bug. Index: src/gui_w32.c === --- src/gui_w32.c (revision 296) +++ src/gui_w32.c (working copy) @@ -1051,7 +1051,7 @@ if (pMenu != NULL pMenu-strings[MENU_INDEX_TIP] != 0 GetMenuState(s_menuBar, pMenu-id, MF_BYCOMMAND) != -1) { - msg(pMenu-strings[MENU_INDEX_TIP]); + msg_outtrans(pMenu-strings[MENU_INDEX_TIP]); setcursor(); out_flush(); did_menu_tip = TRUE; This patch seems to have solved my problem, and I have not found any side-effects so far. Thanks! Best regards, Yongwei -- Wu Yongwei URL: http://wyw.dcweb.cn/
Re: Is there a xml formatter?
wangxu [EMAIL PROTECTED] 写于 2007-05-31 01:17:41: I want to have this function: formatting my xml file automatically. or,indent xml element and attributes. is there any plugin like this? thanks! did you set autoindent ? provide that there's $VIMRUNTIME/indent/xml.vim it should do automatic indent well. Or just try gg=G after you had opened your xml file. -- Sincerely, Pan, Shi Zhu. ext: 2606
Re: Is there a xml formatter?
Op woensdag 30 mei 2007, schreef wangxu: I want to have this function: formatting my xml file automatically. or,indent xml element and attributes. is there any plugin like this? thanks! Well, if you're on a unix machine with xmllint installed, you could do the following: setlocal equalprg=xmllint\ --format\ - and then use gg=G to reformat the entire document. Peter Palm
Re: Why bottom-posting is prefered on Vim Mainling List?
On Tue, 29 May 2007 21:29:57 +0200, David Ne?as (Yeti) [EMAIL PROTECTED] wrote: On Tue, May 29, 2007 at 09:14:43PM +0200, Tobias Klausmann wrote: PS: On another note: how do you (as in y'all) feel about somebody re-arranging your text when quoting you? I guess the simple parts (everything for example gw} does) are okay with just about everyone. But what about the order of points made? Anything that improves the context of the reply and makes it easier to follow (wrt to the replied-to post) is good. I agree. So long as the meaning of the quotes isn't altered in a way that reflects badly on the earlier posters, I don't have a problem with rearranging quotes to deal with points in a better order. Really, what it all comes down to is making your point as clearly as possible, taking into account not only that you have the post to which you're replying fresh in your mind but other readers may not, but also that by the time your response is read it may be separated from its parent by many intervening posts. Everything that's considered good posting style follows logically from that. -- Matthew Winn
Re: Why bottom-posting is prefered on Vim Mainling List?
Am Dienstag, den 29.05.2007, 17:05 +0800 schrieb [EMAIL PROTECTED]: PS: This Off-topic thread has been talked long and I'm sorry to bring excess load to vim mailing list, please mail directly to me if any vimmer friends wants to talk futher about it. Thanks. This was a very good comment. Please do your best for good etiquette and focus on good tips and tricks for vim :-) Thanks, Sebastian.
Re: Vim over cifs share
Fabien Meghazi wrote: I've got a problem while editing files through a cifs share. (probably a datestamp problem) Each time I write buffer to the opened file, vim prompts this : WARNING: The file has been changed since reading it!!! Do you really want to write to it (y/n)? I know it's not an answer to what you asked, but I've usually been able to fix this issue by: - ntpdate pool.ntp.org (or equivalent time sync command) on the client - ntpdate pool.ntp.org (or equivalent time sync command) on the server - umount and mount the share Tobia
Re: Tip#166 Caps_lock and Escape switch and imwheel
Robert Cussons wrote: --snip-- So, on with the problem. I was using the excellent Tip#166 to switch the Caps Lock and Escape keys and it worked wonderfully. Then on Friday, I tried to install imwheel as non-root, don't know if this is possible, but I read the documentation and it didn't mention that it wasn't (incidentally, I was doing this following http://physics.ou.edu/~mcraven/mathmouse.html as a way of getting the mouse wheel to work properly in mathematica under Linux). Anyway I got complaints when trying to install it as it couldn't make the directory /etc/X11/imwheel as I cannot log in as root. So I gave up on that idea and as far as I was concerned had deleted anything to do with imwheel as I used its configure command to install under the prefix of my home directory. The problem is that now when I run the xmodmap ~/.speedswapper command that has worked up until now, the escape key behaves like Caps lock as intended, but the Caps lock key seems to be acting as both Caps lock AND escape, i.e. it will change me from insert to normal mode, but also turns on Caps lock! I am running KDE 3.3.2, Debian Sarge. The speedswapper file is as follows: ! Swap caps lock and escape, good for Vim remove Lock = Caps_Lock keysym Escape = Caps_Lock keysym Caps_Lock = Escape add Lock = Caps_Lock --snip-- Machine just been updated to Debian Etch and the problem has disappeared, not sure why, but I'm happy to have this mapping back, it's so useful, thanks very much to Leif Wickland for posting it. Rob.
OT: Vi in a browser...
Just stumbled across this link: http://gpl.internetconnection.net/vi/ for a basic implementation of Vi, authored in JavaScript. Sick, sick, sick. So just in case you're on a foreign computer that doesn't have vi/vim installed, and you need a fix, you can get it via the web. :) -tim
Re: Is there a xml formatter?
wangxu wrote: I want to have this function: formatting my xml file automatically. or,indent xml element and attributes. is there any plugin like this? thanks! I see that an indent/xml.vim is distributed with Vim. Try the following: 1) In you vimrc, make sure that you enable filetype-related indenting, either by runtime vimrc_example.vim or by filetype plugin indent on 2) If you changed your vimrc, restart Vim. 3) From then on, every xml file should get formatted as you type. 4) to reformat an existing file: gggqG Best regards, Tony. -- In war we're tough and able. Quite indefatigable Between our quests We sequin vests And impersonate Clark Gable It's a busy life in Camelot. I have to push the pram a lot. Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD
Encoding
Hi everybody, I have just recently installed my new linux box. It runs openSUSE 10.2, and I have upgraded vim to version 7.0.243 . Before, I have used older vim versions (6 and older). In the past I have used ctrl-vdecimal_number to insert special characters (there are five uppercase and five lowercase exotic characters in Croatian language). A single byte was used to store each of these characters. However, in version 7 two bytes are used to store each of them! I don't know how to fix this problem. The value of LANG variable is en_US.UTF-8 and encoding is not mentioned in my vimrc file. Decimal values of these exotic characters are 200, 232, 198, 230, 208, 240, 169, 186, 174 and 190. Now 200 is replaced with two bytes: 195 and 136 (decimal) etc. The command :digraphs works fine and lists digraphs using iso-8859-1, I guess. The command :set encoding shows that encoding is utf-8 . Normally, we use the code page ISO-8859-2 here in Croatia. What can I do to force vim to use a single byte to store exotic character? Best regards, Damir Zucic http://physics.mefos.hr/zucic
Re: OT: Vi in a browser...
Hi! On Wed, 30 May 2007, Tim Chase wrote: Just stumbled across this link: http://gpl.internetconnection.net/vi/ for a basic implementation of Vi, authored in JavaScript. Sick, sick, sick. So just in case you're on a foreign computer that doesn't have vi/vim installed, and you need a fix, you can get it via the web. :) as for the classic use case of wanting to edit textfields vim-style (longer blog posts come to mind), I usually use MozEx, an extension to FF, which allows to use any editor for such things. It has more features but I don't use any of them. I can definitely recommend it. Especially considering the splendid UI of the ticket system I'm forced to use. Regards, Tobias -- In the future, everyone will be anonymous for 15 minutes.
Re: Encoding
On Wed, May 30, 2007 at 04:16:57PM +0200, Damir Zucic wrote: In the past I have used ctrl-vdecimal_number to insert special characters (there are five uppercase and five lowercase exotic characters in Croatian language). A single byte was used to store each of these characters. However, in version 7 two bytes are used to store each of them! This is not due to the vim version, Vim 6 is capable of handling Unicode well too. Unicode just was not set up to be the default on your old system. I don't know how to fix this problem. The value of LANG variable is en_US.UTF-8 So for start, set up your locale environment properly. en_US.UTF-8 is English with UTF-8 encoding (that is Unicode) which is definitely different from Croatian with ISO 8859-2. If you prefer English messages and number formats, etc., as I do, set at least LC_CTYPE to fix the character set. Decimal values of these exotic characters are 200, 232, 198, 230, 208, 240, 169, 186, 174 and 190. Note such sentence is generally meaningless unless you specify the encoding (I suppose it's ISO 8859-2 as you mention it below). The command :digraphs works fine and lists digraphs using iso-8859-1, I guess. Digraphs are not encoding dependent. Or they are encoding dependent, depending on how you look at it. The point is that digraphs insert the corresponding character in the current encoding, they do not insert a fixed byte or sequence of bytes. Now you use UTF-8, so they insert the characters in UTF-8 (they are generally *defined* using Unicode codepoints though). The command :set encoding shows that encoding is utf-8 . Normally, we use the code page ISO-8859-2 here in Croatia. What can I do to force vim to use a single byte to store exotic character? To set the encoding of edited files to ISO 8895-2, do set fileencoding=iso-8859-2 But I may suggest something, go with times and use UTF-8, at least for new files. 8bit charsets are so last millenium... If you set set fileencodings=utf-8,iso-8859-2 you will be able to edit both UTF-8 and ISO 8895-2 files. Yeti -- http://gwyddion.net/
Re: Encoding
Damir Zucic wrote: Hi everybody, I have just recently installed my new linux box. It runs openSUSE 10.2, and I have upgraded vim to version 7.0.243 . Before, I have used older vim versions (6 and older). In the past I have used ctrl-vdecimal_number to insert special characters (there are five uppercase and five lowercase exotic characters in Croatian language). A single byte was used to store each of these characters. However, in version 7 two bytes are used to store each of them! I don't know how to fix this problem. The value of LANG variable is en_US.UTF-8 and encoding is not mentioned in my vimrc file. Decimal values of these exotic characters are 200, 232, 198, 230, 208, 240, 169, 186, 174 and 190. Now 200 is replaced with two bytes: 195 and 136 (decimal) etc. The command :digraphs works fine and lists digraphs using iso-8859-1, I guess. The command :set encoding shows that encoding is utf-8 . Normally, we use the code page ISO-8859-2 here in Croatia. What can I do to force vim to use a single byte to store exotic character? Best regards, Damir Zucic http://physics.mefos.hr/zucic The fact that two (or more) memory bytes are used to store characters other than 0x00 to 0x7F is normal; it's part of the definition of UTF-8. To save your data on disk in such manner that each character occupies only one disk byte, set 'fileencoding' appropriately for your files. You will see [converted] when reading and writing ISO_8859-2 files, but again, this is normal, since Vim uses UTF-8 internally to represent the data in memory. See also the second NOTE paragraph under :help 'encoding'. You may want to add the following to your vimrc: if encoding !~? '^u'if not Unicode, let's set it if termencoding == '' let termencoding = encodingsave the keyboard layout endif set encoding=utf-8 endif set fileencodings=ucs-bom,utf-8,iso-8859-2 encoding-detect heuristics setglobal bomb for new Unicode files setglobal fileencoding=iso-8859-2default for new files Best regards, Tony. -- The First Commandment for Technicians: Beware the lightening that lurketh in the undischarged capacitor, lest it cause thee to bounce upon thy buttocks in a most untechnician-like manner.
Re: Vim over cifs share
Each time I write buffer to the opened file, vim prompts this : WARNING: The file has been changed since reading it!!! Do you really want to write to it (y/n)? I know it's not an answer to what you asked, but I've usually been able to fix this issue by: - ntpdate pool.ntp.org (or equivalent time sync command) on the client - ntpdate pool.ntp.org (or equivalent time sync command) on the server - umount and mount the share In fact I'm using vim under linux in order to edit files of a vmware windows image which shares the files. I ntpdated on linux and checked that Windows Time service was started but the problem remains. BUT ! I saw indeed that there was a problem on the windows vmware image, the time is slower ;-) and get desyncronized after a while. I don't have enough knowledge of windows/vmware in order to resolve the problem so I wonder if there's a way to say vim not to warn again with this message. -- Fabien Meghazi Website: http://www.amigrave.com Email: [EMAIL PROTECTED] IM: [EMAIL PROTECTED]
Re: Is there a xml formatter?
Or just try gg=G after you had opened your xml file. 4) to reformat an existing file: gggqG What is the actual difference of these two commands? I usually use = for code and gq for text, so I presumed that one was for formatting and one was for 'linewidth'ing. -- -fREW
Re: Is there a xml formatter?
fREW wrote: Or just try gg=G after you had opened your xml file. 4) to reformat an existing file: gggqG What is the actual difference of these two commands? I usually use = for code and gq for text, so I presumed that one was for formatting and one was for 'linewidth'ing. You may be right. For the exact differences, lookup :help = :help gq Best regards, Tony. -- GOD: That is your purpose Arthur ... the Quest for the Holy Grail ... Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD
window ordering
Hi all! With :sp and :vs, new windows open in bottom-up and right-to-left order, respectively. Is it possible to change this to top-down and left-to-right? For some reason -- including, perhaps, that I've always only used languages with top-down, left-to-right writing direction -- I find that that way of laying things out suits my orientational/navigational habits better. Thank you, Boyko
JSVI: Vi implemented in Javascript
Not sure if everyone's seen this, but it's definitely cool and quite accurate. http://ajaxian.com/archives/jsvi-you-love-vi-you-love-javascript-now-you-have-both -- Kevin Old [EMAIL PROTECTED]
RE: window ordering
Hi Boyko, Yes there is. See: :help 'splitright' :help 'splitbelow' HTH, David -Original Message- From: Boyko Bantchev [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 11:16 AM To: vim@vim.org Subject: window ordering Hi all! With :sp and :vs, new windows open in bottom-up and right-to-left order, respectively. Is it possible to change this to top-down and left-to-right? For some reason -- including, perhaps, that I've always only used languages with top-down, left-to-right writing direction -- I find that that way of laying things out suits my orientational/navigational habits better. Thank you, Boyko
Re: JSVI: Vi implemented in Javascript
Kevin Old wrote: Not sure if everyone's seen this, but it's definitely cool and quite accurate. http://ajaxian.com/archives/jsvi-you-love-vi-you-love-javascript-now-you-have-both Hmm... when's the day when Vim will be implemented in Lisp, so if the boss wants everyone to use Emacs, we can obey and still have the look, feel and functionality of Vim? (Not necessarily the speed, though.) Best regards, Tony. -- It says he made us all to be just like him. So if we're dumb, then god is dumb, and maybe even a little ugly on the side. -- Frank Zappa
Re: JSVI: Vi implemented in Javascript
Hi! On Wed, 30 May 2007, A.J.Mechelynck wrote: Kevin Old wrote: Not sure if everyone's seen this, but it's definitely cool and quite accurate. http://ajaxian.com/archives/jsvi-you-love-vi-you-love-javascript-now-you-have-both Hmm... when's the day when Vim will be implemented in Lisp, so if the boss wants everyone to use Emacs, we can obey and still have the look, feel and functionality of Vim? (Not necessarily the speed, though.) Of course, that has already been done. It's called viper: http://www.delorie.com/gnu/docs/emacs/viper.html Viper Is a Package for Emacs Rebels. Nice Backronym, too. Regards, Tobias PS: I don't know if it's pure lisp. But hey, I don't need it :) -- In the future, everyone will be anonymous for 15 minutes.
Re: JSVI: Vi implemented in Javascript
[Tobias Klausmann] On Wed, 30 May 2007, A.J.Mechelynck wrote: Hmm... when's the day when Vim will be implemented in Lisp [...] Of course, that has already been done. It's called viper: http://www.delorie.com/gnu/docs/emacs/viper.html Viper Is a Package for Emacs Rebels. It's quite far from Vim. Only vi, that is, almost unusable :-). -- François Pinard http://pinard.progiciels-bpi.ca
Re: JSVI: Vi implemented in Javascript
Tobias Klausmann wrote: Hi! On Wed, 30 May 2007, A.J.Mechelynck wrote: [...] Hmm... when's the day when Vim will be implemented in Lisp, so if the boss wants everyone to use Emacs, we can obey and still have the look, feel and functionality of Vim? (Not necessarily the speed, though.) Of course, that has already been done. It's called viper: http://www.delorie.com/gnu/docs/emacs/viper.html Viper Is a Package for Emacs Rebels. Nice Backronym, too. Regards, Tobias PS: I don't know if it's pure lisp. But hey, I don't need it :) Neither do I know, neither do I need it, and Emacs-script is rumored to be Lisp, but since I don't use Emacs (and never did, except maybe for just a few minutes until I found out it wasn't the editor for me), and never used Lisp either (I just know it uses way too much parentheses for sanity) so I don't rightly know. Best regards, Tony. -- In the long run, every program becomes rococo, and then rubble. -- Alan Perlis
Re: Is there a xml formatter?
On 5/30/07, A.J.Mechelynck [EMAIL PROTECTED] wrote: fREW wrote: Or just try gg=G after you had opened your xml file. 4) to reformat an existing file: gggqG What is the actual difference of these two commands? I usually use = for code and gq for text, so I presumed that one was for formatting and one was for 'linewidth'ing. You may be right. For the exact differences, lookup :help = :help gq Best regards, Tony. -- GOD: That is your purpose Arthur ... the Quest for the Holy Grail ... Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD For anyone who was wondering, they can be the same, but they can both be customized, and if they are NOT customized, it looks like gq will textwidthify and = will format for c. -- -fREW
Re: JSVI: Vi implemented in Javascript
On 5/30/07, Kevin Old [EMAIL PROTECTED] wrote: Not sure if everyone's seen this, but it's definitely cool and quite accurate. http://ajaxian.com/archives/jsvi-you-love-vi-you-love-javascript-now-you-have-both -- Kevin Old [EMAIL PROTECTED] Wow... That is brilliant. I kinda wish I were stuck with it, just because it's so ridiculous. -- -fREW
Re: JSVI: Vi implemented in Javascript
Hi! On Wed, 30 May 2007, A.J.Mechelynck wrote: Tobias Klausmann wrote: Hi! On Wed, 30 May 2007, A.J.Mechelynck wrote: [...] Hmm... when's the day when Vim will be implemented in Lisp, so if the boss wants everyone to use Emacs, we can obey and still have the look, feel and functionality of Vim? (Not necessarily the speed, though.) Of course, that has already been done. It's called viper: http://www.delorie.com/gnu/docs/emacs/viper.html Viper Is a Package for Emacs Rebels. Nice Backronym, too. Regards, Tobias PS: I don't know if it's pure lisp. But hey, I don't need it :) Neither do I know, neither do I need it, and Emacs-script is rumored to be Lisp, but since I don't use Emacs (and never did, except maybe for just a few minutes until I found out it wasn't the editor for me), and never used Lisp either (I just know it uses way too much parentheses for sanity) so I don't rightly know. The one use case I know of was binary-patching UUCP back in the day. Back then, vi barfed on line lengths 255. But emacs was just unusable for an admin!. So there was a small howto on installing viper in emacs in order to patch the UUCP binary. Emacs for line length, viper for usability. That howto even made it into a magazine. Regards, Tobias -- In the future, everyone will be anonymous for 15 minutes.
RE: Is there a xml formatter?
Op woensdag 30 mei 2007, schreef wangxu: I want to have this function: formatting my xml file automatically. or,indent xml element and attributes. is there any plugin like this? thanks! Well, if you're on a unix machine with xmllint installed, you could do the following: setlocal equalprg=xmllint\ --format\ - and then use gg=G to reformat the entire document. I don't have much luck with that technique. If xmllint believes the xml isn't quite valid then it screws it up with error messages and such. I wrote this little function to do it for me. Works well enough. Basically, I either run the command :FormatSGML Or, visually select some rows and run the command. function! Format_SGML() range Add a new line to the bottom of the mark to be removed later call cursor(a:lastline,1) put ='' silent! exec ma z Add a new line above the mark to be removed later call cursor(a:firstline,1) put! = '' silent! exec ma y Put each tag on a newline exec line('y).','.line('z).'s/\s*/\r/ge' Reformat using Vim's indenter call cursor(line('y),1) exec 'normal! '.(line('z)-line('y)+1).'==' Delete the additional lines added silent! exe norm! 'ydd'zdd endfunction command! -range=% -nargs=0 FormatSGML line1,line2call Format_SGML() At least you have some additional options now. HTH, Dave
Re: JSVI: Vi implemented in Javascript
On 5/30/07, François Pinard [EMAIL PROTECTED] wrote: [Tobias Klausmann] On Wed, 30 May 2007, A.J.Mechelynck wrote: Hmm... when's the day when Vim will be implemented in Lisp [...] Of course, that has already been done. It's called viper: http://www.delorie.com/gnu/docs/emacs/viper.html Viper Is a Package for Emacs Rebels. It's quite far from Vim. Only vi, that is, almost unusable :-). Unfortunately it doesn't emulate vi properly either. --Antony
Re: Why bottom-posting is prefered on Vim Mainling List?
* [EMAIL PROTECTED] [2007.05.29 05:15]: See, though I always do trim, I still suffered from those who do not trim and use bottom-posting. I take it your mail program doesn't have a hide-quoted-text function. Who says text-based mail programs are primitive? :-) -- JR
No Previous Regular expression
Using vim 7.0 on kubuntu 7.04 (feisty fawn amd 64) I've recently migrated from vim 6-something on slack 10.0 On my previous version and box, if I searched on an expression in one file, closed it and opened another, n would continue with the search. Now, I get an E35: No previous regular expression. I've imported all of my previous settings, .vimrc etc... so I don't know how to correct this. Any help is welcome. thanks tim
Re: No Previous Regular expression
Tim Johnson wrote: Using vim 7.0 on kubuntu 7.04 (feisty fawn amd 64) I've recently migrated from vim 6-something on slack 10.0 On my previous version and box, if I searched on an expression in one file, closed it and opened another, n would continue with the search. Now, I get an E35: No previous regular expression. I've imported all of my previous settings, .vimrc etc... so I don't know how to correct this. Any help is welcome. thanks tim If you close and reopen Vim, the last search pattern is remembered -- or not -- in the viminfo file. (It is one of the registers.) The search history can also be saved. See :help 'viminfo'. By default (unless set otherwise in the vimrc), in 'compatible' mode 50 lines for each register, and 20 lines of history, are remembered. If you mean in the same Vim session (e.g. by doing :e bar.txt after searching in foo.txt), then the search pattern should be remembered, unless there is something which explicitly clears it. An autocommand or a mapping, invoking :let @/ = '', could be such a something. Best regards, Tony. -- The cry has been that when war is declared, all opposition should therefore be hushed. A sentiment more unworthy of a free country could hardly be propagated. If the doctrine be admitted, rulers have only to declare war and they are screened at once from scrutiny ... In war, then, as in peace, assert the freedom of speech and of the press. Cling to this as the bulwark of all our rights and privileges. -- William Ellery Channing
Re: OT: Vi in a browser...
On 5/30/07, Tobias Klausmann [EMAIL PROTECTED] wrote: [...] as for the classic use case of wanting to edit textfields vim-style (longer blog posts come to mind), I usually use MozEx, an extension to FF, which allows to use any editor for such things. It has more features but I don't use any of them. Most of my Vimmers workmates recommend It's All Text! to me. So I just gave up MozEx before I had a try on it. A friend told me that he is developing a Firefox addon to emulate the Vi/Vim behaviors in all text areas in Firefox, without launching external applications. I'm looking forward to it. I can definitely recommend it. Especially considering the splendid UI of the ticket system I'm forced to use. Regards, Tobias -- In the future, everyone will be anonymous for 15 minutes. Shalom, Edward L. Fox
plugins in vim 7.1
Hello, I recently upgraded from vim 7.0 to vim 7.1 (on ubuntu feisty) by compiling the vim7.1 tarball. However, it looks like my plugins are not working, For example, the plugin that used to highlight matching braces/parentheses is not doing so. I downloaded a cscope_maps.vim plugin for some cscope short-cuts and although the plugin seems to be getting loaded, the keystrokes don't seem to be working. The plugins are located at /usr/local/share/vim/vim71/plugins. thanks, -tushar.