Re: Bug report : Spell checking doesn't know about HTML entities
Bram Moolenaar wrote: Tony Mechelynck wrote: In languages using accented letters, the Vim spell checker doesn't recognise HTML entities (in HTML text): for example, the letters outside of the ...; entities are highlighted as spellBad (after :set spell spelllang=fr) in the following French words: ougrave; meaning: où (where) apregrave;s après (after) ceacute;reacute;monie cérémonie (ceremony) courrouccedil;a courrouça ([he] angered) deacute;sespeacute;reacute; désespéré (desperate) neacute;cessairenécessaire (necessary) anneacute;e année (year) etc. They are perfectly valid French words, if one takes into account the following equivalences: ugrave; = ù egrave; = è eacute; = é ccedil; = ç etc. I don't know how to solve the problem; maybe an interpretation layer to resolve the entities between the HTML text and the French (or other non-English language) dictionary? Well, words with HTML things in them are NOT French words. Why don't you use utf-8 encoded HTML? I started that particular site some years ago, in 7-bit ASCII plus entities. I'm loath to change it now, and risk making it incompatible with some older browsers. It already holds quite a bit of text. I disagree with the statement that these words are not French words. In an HTML file, where HTML syntax must be taken into account, they are. If you really want to recognize these words, you could take the French dictionary, do a global replace and build a spell file from that. Actually, I don't use spell (I am blessed with a good sense of orthography); but I wondered if there couldn't (someday) be a solution for people who don't share the same blessing. The proposed solution would mean creating an additional spell file, slightly larger than the French dictionary, for use only with HTML text. I'm not convinced of such a solution's viability, especially since it would have to be repeated for German, Swedish, Turkish, Polish, etc., etc., etc. Maybe even for words like risqué and garçon in English. You'll have to check if using and ; in the middle of a word is causing trouble. Adding them to word characters will probably create different problems. The semicolon can also mean a semicolon, which is a punctuation mark and not a word character, and can be used as such after a word with no intervening space (or with nbsp; preceding it, depending on typesetting conventions). The case of the ampersand is simpler: to obtain a true ampersand in the rendered text, one must use one of amp; (symbolic entity) #38; (decimal entity) or #x26; (hex entity) in the HTML. Best regards, Tony.
Re: Bug report : Spell checking doesn't know about HTML entities
François Pinard wrote: [Bram Moolenar] Tony Mechelynck wrote: In languages using accented letters, the Vim spell checker doesn't recognise HTML entities (in HTML text) [...] You'll have to check if using and ; in the middle of a word is causing trouble. Adding them to word characters will probably create different problems. Character entities come from the old time people were still trying to salvage the 8th bit of each byte, on communication channels, to convey byte parity. And also, whatever justification people may invent, to protect their laziness about using tools able to do more than ASCII. They also bypass compatibility problems for users who have to upload HTML pages to servers where they don't master the headers which will be sent with the HTML. (Yes, now I know about the BOM and the META HTTP-EQUIV=Content-Type tag, but the former isn't mentioned and the latter is only mentioned but not explained, in the books I have about HTML.) Even now, email channels aren't guaranteed do be able to convey 8-bit text other than by downgrading it to 7-bit by means of conversion schemes like quoted-printable or base64: some servers are 8-bit-compliant, others still aren't. In the email I get, I sometimes notice that the body has been autoconverted between 8-bit, quoted-printable and base64 by my ISP's routers, with no obviously apparent rule to such behaviour. One property of character entities which is apparently not so well known (or maybe that property was withdrawn since then) is that the semicolon is optional. It is only mandatory where ambiguity would otherwise arise (for example, when a letter follows, a fairly common case after all). That property is not part of the present rules; it is obsolete and deprecated: ce n'est pas la règle, c'est une tolérance. It is only recognised for downward compatibility; IIUC, it does not apply to XHTML. The semicolon has of course always been mandatory when the entity is immediately followed by a letter or semicolon (or by a digit, but that is rarer). I presume that if software (or people) generating HTML were sparing those semicolons wherever they may be spared, a lot of other software would break, we would get a riot against people following standards :-). I suppose that's why the most recent standards require the semicolons. Best regards, Tony. -- Everything is worth precisely as much as a belch, the difference being that a belch is more satisfying. -- Ingmar Bergman
Re: Selecting tag opens file in a new tab - how?
Zarko Coklin wrote: I posted following question some time back: ~ Is it possible to have a setup in .vimrc so that every time I select tag either through CTRL-] or by holding CTRL and pressing left mouse click to open a new buffer in a new tab? and got following answer that works: :map C-] :exe tab stag expand(cword)CR :map C-LeftMouse :exe tab stag expand(cword)CR ~ The trouble I am having at the moment is that this approach leads to a quick proliferation of open file tabs. Ideally, Vim should not open a new tab for the the file that already has a tab. Rather, it should simply reuse an existing tab and position itself within an open tab. Is there a way to get that done? Thanks in advance, Zarko I think it is possible, but not easy, and would require writing a custom function, especially if you want to still be able to have split windows. I'm not going to try. You may want to try for yourself, or change your behaviour. See, among others: :help tabpagenr() :help tabpagewinnr() :help tabpagebuflist() :help bufname() etc. Best regards, Tony. -- When in doubt, tell the truth. -- Mark Twain
Re: Error
felipe fernandez wrote: I update vim 6.3 to 7.0 on my debian. The error is Se ha detectado un error al procesar /usr/share/vim/vim70/menu.vim: línea 150 E121: Variable sin definir: paste#paste_cmd. E15: Expresión no válida: 'vnoremenu script Edit.PasteTab+gP^I' . paste#paste_cmd['v'] Thanks It's in Spanish, and IIUC it means: Error detected while processing /usr/share/vim/vim70/menu.vim: line 150 E121: Undefined variable: paste#paste_cmd E15: Invalid expression: 'vnoremenu script Edit.PasteTab+gP^I' . paste#paste_cmd['v'] I suppose you applied all current patches. If you didn't, you should. See http://users.skynet.be/antoine.mechelynck/vim/compunix.htm for details. I also recommend compiling Vim from Bram's sources rather than trust Unix/Linux distributions, which always lag behind by weeks if not months (or years). The URL above will tell you how. If, after compiling Vim yourself with all patches, you still get the same error E121, try the following to get all the latest runtime files: 1. Exit Vim. 2. cd to vim70 in your build directory tree (the parent of the runtime/ src/ and other directories); then rsync -avzcP --delete --exclude=/dos/ ftp.nluug.nl::Vim/runtime/ ./runtime/ cd src make installruntime You may or may not have to remove obsolete files from your $VIMRUNTIME directory and below. This (keeping one's runtime files up-to-date) was explained no earlier than yesterday in this same mailing list, in a thread titled Spell check not working when editing HTML. Oh, and I forgot: if your shell environment (outside of Vim) includes a setting for $VIMRUNTIME, remove it, especially if it's set to the .../vim63/ directory. Vim ought to be able to find its runtime files anyway. Also make sure (using vim --version |more without the quotes at the shell prompt) that the first Vim in your $PATH is your new Vim 7.0. Best regards, Tony. -- A diplomat is a man who can convince his wife she'd look stout in a fur coat.
Re: Error
Andreas Bakurov wrote: felipe fernandez wrote: I update vim 6.3 to 7.0 on my debian. The error is Se ha detectado un error al procesar /usr/share/vim/vim70/menu.vim: línea 150 E121: Variable sin definir: paste#paste_cmd. E15: Expresión no válida: 'vnoremenu script Edit.PasteTab+gP^I' . paste#paste_cmd['v'] Thanks Check your ~/.vimrc file. Probably you have error on line 150. no, the error is at line 150 of menu.vim and points to a missing or invalid $VIMRUNTIME/autoload/paste.vim Best regards, Tony. -- Drugs may be the road to nowhere, but at least they're the scenic route!
Project script
Hi all: I started using the Project script http://www.vim.org/scripts/script.php?script_id=69. Apparently, it cannot gather files recursively in subdirectories, for example: project/a/test.tex project/b/c/abc.tex project/d/e/xyz.tex I would like to have all *.tex files listed in Project, something like that: Projects=/home/user/project filter=*.tex flags=??? { test.tex abc.tex xyz.tex } Furthermore, whenever I add another .tex file somewhere in project/ or any of its subdirectories I would like to have it updated. Did I overlook something or is the not possible? Would there be an easy workaround? Claus
Re: Highlight a specific character using colorscheme?
flope wrote: Hi, this is my second post. so I am new in vim (gvim). I would like to know if it possible to highlight a specific character such as ; differently from others. I tried different things but without success. Should I do that in my color scheme? Don't use a colorscheme, use the :match statement (see :help :match). For instance, to highlight all semicolons in the same colour as the bracket under the cursor and its mate, (in gvim that would be black on cyan, unless changed by a colorscheme) use :match MatchParen /;/ I use to edit perl scripts so If I load my colorscheme in the .gvimrc file and the syntax is on, is the perl syntax overwritten by my color scheme? at least some of the parameters? A colour scheme has nothing to do with syntax (e.g. what is an Identifier and what is a Comment), it has everything to do with colouring (e.g., whether to show comments in blue on white, or in yellow on black). Syntax scripts are concerned with both. A properly-built colorscheme should not be overridden by any properly-built syntax script. A syntax script should use the default modifier in all its :highlight statements (so as not to override settings already set by a colorscheme) and it should use :highlight default link in preference to specific colours whenever possible. When :syntax on is used after your colorscheme has been set, the latter is (IIUC) re-invoked, thanks to the g:colors_name variable. thank you for your help!!! My pleasure. Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 132. You come back and check this list every half-hour.
Re: question about omni-complete
shawn bright wrote: lo there, i just discovered omni-complete . i am starting to use vim for some python and ruby scripting for work. i found omni-complete. I can type time.ctrl-x ctrl-o and a list of funtions pop up for me to choose. but how do i navigate the list without using arrow keys ? it is getting kinda natrual to use jk to move up and down ( i find myself typing j and k into other text editors) what keys do i use to navigate and select the function from the list ? thanks sk Try Ctrl-N (next) and Ctrl-P (previous), as mentioned under :help i_CTRL-X_CTRL-O. The same keys are used for other kinds of Insert-mode completion. IIUC, when you're at the first match, Ctrl-P goes back to what you typed without removing the menu: thus, you can type in more characters of context and the menu will change accordingly. Best regards, Tony. -- If Jesus Christ were to come today, people would not even crucify him. They would ask him to dinner, and hear what he had to say, and make fun of it. -- Thomas Carlyle
Re: Project script
Claus Atzenbeck wrote: Hi all: I started using the Project script http://www.vim.org/scripts/script.php?script_id=69. Apparently, it cannot gather files recursively in subdirectories, for example: project/a/test.tex project/b/c/abc.tex project/d/e/xyz.tex I would like to have all *.tex files listed in Project, something like that: Projects=/home/user/project filter=*.tex flags=??? { test.tex abc.tex xyz.tex } Furthermore, whenever I add another .tex file somewhere in project/ or any of its subdirectories I would like to have it updated. Did I overlook something or is the not possible? Would there be an easy workaround? Claus I don't know about that script, but Vim has the special ** wildcard to recurse into directories. See :help starstar :help starstar-wildcard Best regards, Tony. -- The Good Ship Enterprise (to the tune of The Good Ship Lollipop) On the good ship Enterprise Every week there's a new surprise Where the Romulans lurk And the Klingons often go berserk. Yes, the good ship Enterprise There's excitement anywhere it flies Where Tribbles play And Nurse Chapel never gets her way. See Captain Kirk standing on the bridge, Mr. Spock is at his side. The weekly menace, ooh-ooh It gets fried, scattered far and wide. It's the good ship Enterprise Heading out where danger lies And you live in dread If you're wearing a shirt that's red. -- Doris Robin and Karen Trimble of The L.A. Filkharmonics
Undo Levels Reset
When a file is saved with :w, any changes in the undo history are lost and I can't undo things to get back to a state before I saved the file. How can I prevent the history being lost? -- .
Re: Undo Levels Reset
Vigil wrote: When a file is saved with :w, any changes in the undo history are lost and I can't undo things to get back to a state before I saved the file. How can I prevent the history being lost? Huh? When I save a file, undo levels are kept. Using u then undoes, but marks the file as modified. Using Ctrl-R redoes, and the 'modified' flag will disappear when the file-in-memory is identical to the file-on-disk. The undo history is only lost when I close Vim with :qa Best regards, Tony. -- You can't have everything. Where would you put it? -- Steven Wright
Re: Project script
Hi Claus, claus Atzenbeck schrieb: I started using the Project script http://www.vim.org/scripts/script.php?script_id=69. Apparently, it cannot gather files recursively in subdirectories, for example: project/a/test.tex project/b/c/abc.tex project/d/e/xyz.tex In the project window you can use \c to generate a new project fold. It will ask you a few things an generate it for you. In your case you may want to use \C which works recursively. Furthermore, whenever I add another .tex file somewhere in project/ or any of its subdirectories I would like to have it updated. In the directory fold press \r. Again \R works recursively, so you can also press \R in the top level of the project. See also :help project.txt Regards, Mika
Re: Failed to print PostScript file
Hi, I found the problem. In the line call system(lpr -h . a:fname), there must be a space after -h, i.e.: call system(lpr -h . a:fname). Laszlo On 3/8/07, Jabba Laci [EMAIL PROTECTED] wrote: Hi, Until now I could print my files from Vim using the :ha command. I have the following in my .vimrc file: ### set printoptions+=header:0 set printexpr=PrintFile(v:fname_in) function! PrintFile(fname) call system(lpr -h . a:fname) call delete(a:fname) return v:shell_error endfunc ### But now I get the following error: E365: Failed to print PostScript file In my shell PRINTER is set (to [EMAIL PROTECTED]), and in gv I can print (with lpr -h [EMAIL PROTECTED]) without any problem. Do you have an idea how to solve it? Thanks, Laszlo
Re: Undo Levels Reset
A.J.Mechelynck wrote: When I save a file, undo levels are kept. Using u then undoes, but marks the file as modified. Using Ctrl-R redoes, and the 'modified' flag will disappear when the file-in-memory is identical to the file-on-disk. This is my experience as well. Undo levels are only lost when I close Vim, when I reopen the file with :e, or when Vim alerts me that the file has been changed and reloads it. The latter can be dangerous if you're not careful, and I'd appreciate any tips to work around it. Tobia
Re: Project script
On Fri, 23 Mar 2007, Mika Fischer wrote: In the project window you can use \c to generate a new project fold. It will ask you a few things an generate it for you. In your case you may want to use \C which works recursively. Furthermore, whenever I add another .tex file somewhere in project/ or any of its subdirectories I would like to have it updated. In the directory fold press \r. Again \R works recursively, so you can also press \R in the top level of the project. Thanks for your mail. \C works perfectly, however \R seems not to add recently created subdirectories. Is there a way to update a Project entry as if I would create a new entry with \C? Claus
Re: Project script
Hi Claus, * Claus Atzenbeck [EMAIL PROTECTED] [2007-03-23 13:20]: Thanks for your mail. \C works perfectly, however \R seems not to add recently created subdirectories. That's true. Is there a way to update a Project entry as if I would create a new entry with \C? Not that I know of. I tend to just create the new fold manually since it doesn't happen too often... I think the Project script is still maintained by Aric Blumer. I don't know if he reads this list, but it might be nice to ask him about it. Maybe he'll implement it... Regards, Mika
Re: Highlight a specific character using colorscheme?
Thanks a lot. It works! Very instructive. -- View this message in context: http://www.nabble.com/Highlight-a-specific-character-using-colorscheme--tf3450062.html#a9637945 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Undo Levels Reset
Hmm. My bad, I guess. I must have had some weird settings at the time. Sorry, list! A.J.Mechelynck wrote: When I save a file, undo levels are kept. Using u then undoes, but marks the file as modified. Using Ctrl-R redoes, and the 'modified' flag will disappear when the file-in-memory is identical to the file-on-disk. -- .
Error In Documentation?
In vim's: VIM - Vi IMproved 7.0 (2006 May 7, compiled May 30 2006 13:06:19) VIM - Vi IMproved 6.4 (2005 Oct 15, compiled May 23 2006 12:03:57) in :help makeprg, I think the {$*} in the example ought to be ${*}. At least, it wouldn't work for me unless I did that. -- .
Re: Count characters
Andy Wokula schrieb: Tim Chase schrieb: Is there some function or script to count characters (letters without whitespaces) in vim? For example Kile the Latex Editor has such a feature to control how long texts are. You can use :%s/\w//g which will report back X substitutions on Y lines. X represents the number of characters of interest. Adjust the \w regexp for whatever constitutes your definiton of characters that you want to count. Thus, this might be :%s/\a//g (only letters) :%s/\S//g(non-whitespace) Or any other such combo. It does have the side effect of modifying your document (setting the modified flag). If this is a problem, you can undo it and it should revert. It also requires that the document not be readonly (or at least it will gripe if it is, warning you that you're changing a RO document). If you have fewer than 'report' characters, Vim won't report back: :help 'report' but you can set this to :set report=0 to always report any changes. There are ways to do it on non-modifiable buffers, but they require a bit more programatic logic, such as :let x=0 :g/^/let x+=strlen(substitute(getline('.'), '\W', '', 'g')) :echo x where the '\W' is the inverse-set of characters of interest. In this case, if you're interested in \w characters, the \W is the inverse. If you're interested in non-whitespace characters (\s), you would use \S; and if you're interested in counting vowels, you could use [^aeiouAEIOU]. You might even notice that the second version uses a :g command that matches every line. With this, you have a lot of flexibility: :','g/^/let ... counts characters in the linewise selection :g/foo/let ... counts characters on lines containing foo and the like. All sorts of fun things at your disposal :) Hope this helps, -tim Therefore in Vim7 the 'n' flag was added to the substitute command: :%s/\S//gn just reports the number of matches. Works also for read-only files, because no text is changed. :h :s_flags Andy Ok, thanks. This are a lot of cool Tips. But to complete the discussion maybe there is missing a command or script to count the characters without syntax words. For example for people who write LaTeX documents in vim and have to control theyr length... regards, Harry
Re: Error In Documentation?
Vigil wrote: In vim's: VIM - Vi IMproved 7.0 (2006 May 7, compiled May 30 2006 13:06:19) VIM - Vi IMproved 6.4 (2005 Oct 15, compiled May 23 2006 12:03:57) in :help makeprg, I think the {$*} in the example ought to be ${*}. At least, it wouldn't work for me unless I did that. No, it's really $*. This is replaced by Vim before passing the command to the shell. -- MONK: ... and the Lord spake, saying, First shalt thou take out the Holy Pin, then shalt thou count to three, no more, no less. Three shalt be the number thou shalt count, and the number of the counting shalt be three. Four shalt thou not count, neither count thou two, excepting that thou then proceed to three. Five is right out. Once the number three, being the third number, be reached, then lobbest thou thy Holy Hand Grenade of Antioch towards thou foe, who being naughty in my sight, shall snuff it. Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Project script
On 3/23/07, Mika Fischer [EMAIL PROTECTED] wrote: Hi Claus, * Claus Atzenbeck [EMAIL PROTECTED] [2007-03-23 13:20]: Thanks for your mail. \C works perfectly, however \R seems not to add recently created subdirectories. That's true. Is there a way to update a Project entry as if I would create a new entry with \C? Not that I know of. I tend to just create the new fold manually since it doesn't happen too often... I think the Project script is still maintained by Aric Blumer. I don't know if he reads this list, but it might be nice to ask him about it. Maybe he'll implement it... Regards, Mika He certainly responds to emails about bugfixes and did so for me just a few months ago, so it's worth a shot to email him. -- -fREW
How to save/quit on easy mode
I want to use vim's easy mode (-y) for entering comments when committing to my version control system. But I couldn't find any documentation on how to save/quit on easy mode. Can anybody tell me how to do this?
Re: Count characters
Harald Kröll wrote: a command or script to count the characters without syntax words. For example for people who write LaTeX documents in vim and have to control their length... That depends on the definition of a control word. If you only want to exclude \backslash_prefixed \words, and nothing else, then this will do: :%s/\(\\\w*\)\@!\w//gn Explanation (right to left): //gncount ALL… \w …letters, numbers, and underscores… \@!…NOT preceded by… \( \\ \w* \)…a backslash and possibly other letters/numbers I'm not too familiar with Latex syntax, but if you wanted to exclude \this[kind of thing] as well, it wouldn't be hard: :%s/\v(\\\w*(\[[^]]*)?)@!\w//gn ( \\ \w* ( \[ [^]]* )? )@! \w Tobia
pasting very long text at command-line
This happened to me always by mistake and what happened today was the worst. Forgetting that I have copied large amount of text into the clipboard, I tried to paste it at the search prompt using ^R* and this caused Vim to hang for a very long time and pressing ^C had no effect. I remember that Vim used to crash when a large amount of text is pasted this way, but I think that problem is now fixed, though I think a better behavior is needed, e.g., - Stop and give error after reaching some limit - Detect ^C and stop. Any comments? -- Thanks, Hari Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html
Jump to tag opens VIM in a new Microsoft Windows XP window
When I jump to a tag reference in a different file, can I have VIM open that file in a new Microsoft Window? As it works now, I jump to the new file in the same VIM session. I have three problems with that: 1. VIM will not jump to the tag unless all of the changes in my current file have been saved. 2. When I jump to the new file, I loose the undo buffer for the previous file. 3. I would prefer to look at the new file in a separate, side-by-side Microsoft Window. I see how I can jump to a new split window in the current VIM session, but that is not preferred/ideal. Thanks, Bill
IDE's Vim 7 and Apple OS X
Hi All, When you download c.vim : C/C++-IDE, BASH-IDE, or Perl-IDE, for example, the directions to install and get the menu items to show up, goes as follows: install details Copy the zip archive cvim.zip to $HOME/.vim/ and run unzip cvim.zip While this works fine on Linux; Mac OS X Vim does not recognize or read the $Home/.vim directory, is there an alternate location to place the IDE files? On Windows it is the c:/program files/vim/plugin directory or something close to that. Can't figure what it might be on Mac. Any Ideas? Thanks, Joe
Re: Jump to tag opens VIM in a new Microsoft Windows XP window
On 2007-03-23, Waters, Bill [EMAIL PROTECTED] wrote: When I jump to a tag reference in a different file, can I have VIM open that file in a new Microsoft Window? As it works now, I jump to the new file in the same VIM session. I have three problems with that: 1. VIM will not jump to the tag unless all of the changes in my current file have been saved. You can fix this by making the current buffer hidden before executing the jump. See :help hidden :help bufhidden :help hide 2. When I jump to the new file, I loose the undo buffer for the previous file. Making the buffer hidden will fix that, too. 3. I would prefer to look at the new file in a separate, side-by-side Microsoft Window. In that case, you could map your jump to tag key to a command that would execute gvim -t cword I'll leave that to you to figure out since it may require :!start gvim ... instead of just :!gvim ... and I don't do Windows that much. See :help :! :help :!start :help -t :help map.txt HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Mobile Broadband Division | Spokane, Washington, USA
How to remove all indenting features on Windows GVIM
This is the most annoying of the features on GVIM.. I like GVIM because it had syntax highlighting, but my fingers are programmed to handle indenting with just the basic indenting that is standard even on the elder vi implementation. How it's hurting me now, an example in PHP: if (!is_a(pcollection,$pcollection)) return error(false,pcollection invalid in pload-load); Everytime I type in the line above, the whole line jumps a tab to the right.. This is very bothersome, and has been followed with me deleting the auto inserted tab at the beginning.. But every time I do something that Vim interprets as something that needs to be indented, without me asking for it explicitly, it just does it.. I have tried everything to get the indenting to default to basic auto indention, which is to not predict the unpredictable. I kind of believe that auto-indent features were brough into the world by Microsoft in an effort to stimulate a software repurchase, this should never be a default feature of any application, except for auto field fill, or auto-completion, in all other cases it's disorienting..
Re: How to remove all indenting features on Windows GVIM
On 2007-03-23, Kiernan Holland [EMAIL PROTECTED] wrote: This is the most annoying of the features on GVIM.. I like GVIM because it had syntax highlighting, but my fingers are programmed to handle indenting with just the basic indenting that is standard even on the elder vi implementation. I assume you're running gvim on Windows so I'll assume you have indenting enabled because your _vimrc has source $VIMRUNTIME/vimrc_example.vim at the top, which contains this line: filetype plugin indent on To turn indenting off for all file types, just put this line in your _vimrc below that source line: filetype indent off See :help filetype-indent-off HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Mobile Broadband Division | Spokane, Washington, USA
How to turn a q recording into a map?
Somehow it never occured to me that I could view and edit the contents of a recording. Of course, it's just a register, so I pasted the register; edited the contents; then yanked the lines back into the register... and naturally this worked fine. I was thinking that there should be a way to take the register lines and automatically turn them into an noremap (including adding the @ to start register playback). Has anyone perfected this? Yours, Noah
Re: How to turn a q recording into a map?
* [EMAIL PROTECTED] [2007.03.23 19:45]: I was thinking that there should be a way to take the register lines and automatically turn them into an noremap (including adding the @ to start register playback). Has anyone perfected this? If you want your mapping to follow the (possibly changing) content of q: map F2 @q If you want your mapping to stay fixed even if register q changes: :exe map F2 . expand(@q) and then you can map that... map F3 :exe map F2 . expand(@q)CR HTH, -- JR
Re: Selecting tag opens file in a new tab - how?
A.J.Mechelynck schrieb: Zarko Coklin wrote: I posted following question some time back: ~ Is it possible to have a setup in .vimrc so that every time I select tag either through CTRL-] or by holding CTRL and pressing left mouse click to open a new buffer in a new tab? and got following answer that works: :map C-] :exe tab stag expand(cword)CR :map C-LeftMouse :exe tab stag expand(cword)CR ~ The trouble I am having at the moment is that this approach leads to a quick proliferation of open file tabs. Ideally, Vim should not open a new tab for the the file that already has a tab. Rather, it should simply reuse an existing tab and position itself within an open tab. Is there a way to get that done? Thanks in advance, Zarko I think it is possible, but not easy, and would require writing a custom function, especially if you want to still be able to have split windows. I'm not going to try. You may want to try for yourself, or change your behaviour. See, among others: :help tabpagenr() :help tabpagewinnr() :help tabpagebuflist() :help bufname() etc. Best regards, Tony. Another idea: Usage of 'switchbuf' :set switchbuf=useopen,usetab Problem: Works with buffer names only - Get filename of tag and search it in the buffer list i.e. (first move cursor to tag) :exe tab sbuf taglist(expand(cword))[0].filename HTH, Andy -- EOM ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
hosting wiki tips
I know this came up during the recent discussions on using wiki for tips and it was ruled out. I don't remember exactly what the reason was and there are too many messages to go through, so I would like to pose this question again. I came across this free hosting website called 110mb.com which has like 2gb of free space with no advertisements and no catches on hosting, and many people were successful in hosting mediawiki (search their forums) and other wikis on their space. Why shoudn't this be an option that we should consider? I don't know how successful their business model is, but if they already proved that it works, they might be around for a long time. -- Thanks, Hari Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
Re: pasting very long text at command-line
Hari Krishna Dara wrote: This happened to me always by mistake and what happened today was the worst. Forgetting that I have copied large amount of text into the clipboard, I tried to paste it at the search prompt using ^R* and this caused Vim to hang for a very long time and pressing ^C had no effect. I remember that Vim used to crash when a large amount of text is pasted this way, but I think that problem is now fixed, though I think a better behavior is needed, e.g., - Stop and give error after reaching some limit - Detect ^C and stop. Any comments? Ctrl-C ought to be detected, but some users (especially Vim newbies on Windows) remap it to yank to clipboard. You might want to try Ctrl-Break, which also (IIRC) has the property that (at the keyboard interrupt driver level) it empties the keyboard buffer (of waiting keys). Best regards, Tony. -- Steinbach's Guideline for Systems Programming: Never test for an error condition you don't know how to handle.
Re: IDE's Vim 7 and Apple OS X
Rui Gonçalves wrote: if you put the '~/.vim' directory in the runtime path (set runtimepath=~/.vim,...) probably you can put the file in this directory. i think you also can put the files in the directory where vim is installed (for example '/usr/share/vim/vim70'). *DON'T.* Any upgrade may (and the upgrade to Vim 7.1 or Vim 8 will) silently overwrite any changes you made in $VIMRUNTIME or its subfolders. regards Rui Gonçalves Use one of the directories listed *before* $VIMRUNTIME in the 'runtimepath' option. Typical values include: $VIM/vimfiles (e.g. /usr/local/share/vim/vimfiles or C:\Program Files\Vim\vimfiles): for system-wide scripts. $HOME/.vim or $HOME/vimfiles (e.g. /home/johndoe/.vim or C:\Documents and Settings\John Doe\vimfiles): for single-user scripts. Use :set runtimepath? (without the quotes) to see what 'runtimepath' is set to on your system. Best regards, Tony.