Re: embedable vim?
On Wed, 2007-05-16 at 21:26:10 -0400, Franco Saliola sent: I hate typing in the html text boxes and would much prefer to use vim to edit my email. Don't we all? Using w3m, it's easy to use Vim to edittext areas. I shall assume that you are using a graphic web-browser and assume further that you are using Firefox. In which case then there a couple of extensions / add-ins for Firefox which you can use. My preference is: ViewSourceWith http://dafizilla.sourceforge.net/viewsourcewith/ Others like: It's All Text! https://addons.mozilla.org/firefox/4125/ Both require a little configuration to tell them where (g)Vim is, etc. This was discussed on this list a little while ago http://thread.gmane.org/gmane.editors.vim.mac/127/. This isn't embedding /per se/, but it does help with email composition. Best; --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ Ubuntu http://johnsy.com/20070509114406 MovieWorld LogFlume http://johnsy.com/albums/459588081 pgpwsPUUIbJ76.pgp Description: PGP signature
Re: auto closing tags in HTML
On Mon, 2007-02-19 at 17:32:36 -0600, Simon Jackson sent: how do i tell vim to close html tags as i'm writing them and place the cursor in between the 2 tags? I have been using the following plugin for the past few years: http://www.american.edu/econ/notes/html_xhb.vim Works a treat for me. Hope this helps; --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ Extensions http://johnsy.com/20070217204833 2007-02-04 Eric Clapton 015 http://johnsy.com/albums/379130850 pgpqIfNDp3M0K.pgp Description: PGP signature
Re: Web-based editing [Was :wq vs ZZ]
On Thu, 2007-02-15 at 03:31:21 +0100, Bram Moolenaar sent: Web-based editor? Why not use Vim as your editor from within Firefox? Works a treat for me! ViewSourceWith http://dafizilla.sourceforge.net/viewsourcewith/ Don't see something about Vim here... Sorry, Bram, I should have mentioned that a little configuration is required here. I should also mention that ViewSourceWith does more than it says on the tin, insofar as you can do more than viewing source with it. It provides a menu item for you to launch your favourite text editor (Vim) from a textarea. I've been using it for a while now under Windows. I suspect that to use it under Linux then a shell script like the one you provided would be needed. Cheers; --paj Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ The Greatest Gig In The Sky! http://johnsy.com/20070202132640 2007-02-04 Eric Clapton 015 http://johnsy.com/albums/379130850 pgpOKQCYeEsd0.pgp Description: PGP signature
Re: Web-based editing [Was :wq vs ZZ]
On Thu, 2007-02-15 at 14:21:46 +1100, Cameron Simpson sent: I'sAT puts a little edit button on the bottom right corner of the text area. An ergonomic win. I shall be trying it next time I get ten minutes :-) Best; --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ The Greatest Gig In The Sky! http://johnsy.com/20070202132640 2007-02-04 Eric Clapton 015 http://johnsy.com/albums/379130850 pgpAvPHoEaCUF.pgp Description: PGP signature
Re: Web-based editing [Was :wq vs ZZ]
On Tue, 2007-02-13 at 16:07:32 -0700, [EMAIL PROTECTED] sent: (Sorry guys, my web-based editor, which I must use at work becauseof IT paranoia about SMTP, simply will not let me reply at the end rather than beginning of the thread.) Web-based editor? Why not use Vim as your editor from within Firefox? Works a treat for me! ViewSourceWith http://dafizilla.sourceforge.net/viewsourcewith/ Hope this helps; --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ The Greatest Gig In The Sky! http://johnsy.com/20070202132640 2007-02-04 Eric Clapton 015 http://johnsy.com/albums/379130850 pgpfk1ua0bm47.pgp Description: PGP signature
Re: Inline script execution
On Tue, 2006-10-31 at 06:02:08 +0100, A.J.Mechelynck sent: You are talking about the example given in the explanation for the :@ command. I don't see any such example under :help :@ (in *repeat.txt*For Vim version 7.0. Last change: 2006 Sep 20 at lines 120 sqq.). Where are you seeing that example? I think :help :@ is a red herring here. The example is under :he vim-script-intro. To the OP: The lines are being executed as you enter them on the command line, which is why you get the first result back so soon. Try pasting the example into a script file (say, test.vim), since this is a scripting example. :source test.vim should provide you with the output I think you expect. Hope this helps; -paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ Spring Forward, Fall Back. http://johnsy.com/20061027220525 2006-10-22-Morningt...http://johnsy.com/albums/flickr/276677528 pgportW5tF9yS.pgp Description: PGP signature
Re: Two problems
On Fri, 2006-09-15 at 20:20:58 +0200, A.J.Mechelynck sent: You could simply do :%g/.{73,}/normal gqq see help gqq This would of course keep the hard line break (if there is one) between ...Very Very Very and Very Very Very long line. You can't have it both ways. Indeed. The alternative solution would be to insert a blank line above each function definition (if one did not exist), which may improve the clarity of the document. Just a thought... --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ TFI Friday!http://johnsy.com/20060915095839 dsc00893 http://johnsy.com/albums/flickr/243791420 pgp1fC4KQFQyS.pgp Description: PGP signature
Re: Two problems
On Fri, 2006-09-15 at 04:57:24 +0200, Meino Christian Cramer sent: Hi Pete! Hi! thank you very much for this line of code -- works like a charme! Delighted to hear it. The only bad thing is: I dont understand completly, how it works He he... I'm glad that someone's taken this apart :-) 1,$for the beginning of the text til its end do And there's a 'g'... /.\{73,}/ find all lines longer than 72 chars and for each do Yup. normal ??? go into normal mode ??? v ? visual mode (and for what is the good for?) normalv}gq isn't an editor command, so you have to split 'normal' and 'v'. There may be a better way of doing this. }gq only white noise for mea C-programme I would say, that there is on } too many in the whole expression but simultaneously I know, that I am wrong.??? } is a motion: it moves one paragraph forward. See :help } gq formats the highlighted lines. See :he gq There are other ways of solving this problem, I am sure, but I like the way this works because it leaves paragraphs alone that are shorter then 73 characters wide, rather than expanding them. Cheers; --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ More On OptusNet http://johnsy.com/20060912132225 dsc00220 http://johnsy.com/albums/flickr/210370644 pgpCPeNAGzZPh.pgp Description: PGP signature
Re: Allow only one instance of vim on Windows
On Tue, 2006-08-22 at 17:49:09 -0400, Jack Donohue sent: Not exactly what you were asking for, but Vim 7 seems to have a right mouse button context menu items for starting a new instance of vim or opening the file in the existing instance. Indeed it does, but this won't start a new tab for you. If you specifically want to open new tabs for files, the following solution may work for you: 1. Create a Windows shortcut in %USERPROFILE%\SendTo 2. For the location of the item, enter C:\Program Files\Vim\vim70\gvim.exe --servername GVIM --remote-tab-silent 3. Give your shortcut an appropriate name. 4. You can now right-click on files and Send To a new Vim Tab. Hope this helps; -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ Taking Stock http://johnsy.com/20060821101816 dsc00220 http://johnsy.com/albums/flickr/210370644 pgpEROr2dx7BW.pgp Description: PGP signature
Re: Email Text Formatter Plugin
On Mon, 2006-08-21 at 20:54:21 -0500, Tom Purl sent: I'm looking for a simple function that will reformat a selected block of text for e-mail messages (80 columns long, preserving characters, etc). Vim Cream can do this very well, but the functionality doesn't easily translate to vanilla Vim from what I can see, and I prefer using Vim instead of Cream. Is there a function that allows me to do this for Vim? Have you tried 'gq'? This works perfectly for me with visual blocks. See: :help gq Hope this helps; --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ Taking Stock http://johnsy.com/20060821101816 dsc00220 http://johnsy.com/albums/flickr/210370644 pgpFAXUjYY1i8.pgp Description: PGP signature
Re: Email Text Formatter Plugin
On Mon, 2006-08-21 at 23:47:56 -0400, cga2000 sent: Someone on the list recently suggested I use gqip to reflow paragraphs and I was going to suggest that. Much to my delight, I later found that it also preserved the characters in e-mail messages, so I was going to recommend using that. Indeed. This would work well for a given paragraph. :h gq tells me that the general format is gq{motion} .. but what kind of motion is ip..? i should move the cursor up just one line but what about p..? Close but no cigar. 'k' would move up a line. 'ip' is Inner Paragraph. See: :he ip :he object-motions will help you speed up your Vim usage. Best; --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ Taking Stock http://johnsy.com/20060821101816 dsc00220 http://johnsy.com/albums/flickr/210370644 pgp6qaobD7FeN.pgp Description: PGP signature
Re: Display the current character
On Tue, 2006-08-08 at 10:00:59 -0500, Ben lemasurier sent: Is there a way to dispaly the current cursor position? e.g,, character 23. In addition to Jürgen and Tim's suggestions, I offer you C-G, which will display the cursor position. Of course all of this information is available in the ruler, but if you don't want the ruler displayed all of the time, then this is an alternative. See :help CTRL-G Hope this helps; --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ Free phonecallshttp://johnsy.com/20060803011538 Irn Bru Spotted in ...http://johnsy.com/albums/flickr/206931188 pgpWEN5MKtnai.pgp Description: PGP signature
Re: matchit doesn't work for php
On Thu, 2006-07-13 at 06:42:43 +0200, Cesar Romani sent: In the following function the bracket at 3 doesn't match the bracket at 17 And the bracket at 5 doesn't match the bracket at 8 I don't think matchit.vim is to blame here. I have tried your code with VIM - Vi IMproved 7.0 (2006 May 7, compiled Jun 26 2006 20:24:17) with matchit.vim removed and it still misbehaves. Somewhat surprisingly, though, matchparen.vim is highlighting the correct braces! I'm sorry I cannot provide a solution, but hopefully this will point you in the right direction. Best wishes; --paj -- Pete Johns http://johnsy.com/ Contact Information http://johnsy.com/contact/ Bothered http://johnsy.com/20060709100906 pgpMJdEjnEt04.pgp Description: PGP signature
Re: Stop highlighting
On Tue, 2006-06-20 at 03:57:34 -0700, vimnewb sent: By mistake I made a search for a character in a file in vim. How do I stop the highlighting of that character everywhere in the file? :noh See :help :nohlsearch Hope this helps; --paj -- Pete Johns http://johnsy.com/ Tel/Fax numbers and IM information http://johnsy.com/contact/ Re-Connected http://johnsy.com/20060615114630 pgpcqw4B9aWWc.pgp Description: PGP signature
Re: nmap, scripts and UTF-8
On Thu, 2006-06-15 at 13:16:00 +0700, Vu The Cuong sent: Hi all Hello, Vu! How can I set the width of vim window more larger (not maximum)? I only know that put something in vimrc file but I don't know exactly what need to be added to vimrc file. Thanks If you want to include it in your .vimrc and not your .gvimrc, I suggest wrapping the option, thus: if has(gui_running) 86 columns are given as an example... set columns=86 endif For further information, see: :help .gvimrc :help :set :help 'columns' Since your question was not related to nmap, scripts or UTF-8, it would have been prudent to start a new thread by sending a new mail to the list (not a reply) and specifying a more appropriate Subject:. It's worth bearing this in mind as it will prevent disrupting threads and may mean that you are more likely to get a helpful response in future. Hope this helps; --paj -- Pete Johns http://johnsy.com/ Tel/Fax numbers and IM information http://johnsy.com/contact/ Registration Closed! http://johnsy.com/20060608115801 pgpm4wAdixiP9.pgp Description: PGP signature
Re: sftp file browsing
On Tue, 2006-05-30 at 16:36:23 -0500, Jared sent: hmm... I just realized that I was trying this on 6.3. The only copy of Vim 7 I have available is on my Windows box, but of course there is no sftp command. I do have pftp from PuTTY, however. I can I change the command that netrw uses? I see from the docs that it's saved in the g:netrw_sftp_cmd variable, but I can't figure out how to change it. This should work on v6.3: 20060318 using PSCP on Windows. N.B: Works best with Pageant. {{{ if ($OS =~Windows) let g:netrw_scp_cmd=\c:\\Program Files\\PuTTY\\pscp.exe\ -q Now with added SFTP: let g:netrw_sftp_cmd=\c:\\Program Files\\PuTTY\\psftp.exe\ endif }}} I don't have access to an sftp server to test it, but the scp line works. I hope this helps; --paj -- Pete Johns http://johnsy.com/ Tel/Fax numbers and IM information http://johnsy.com/contact/ Yet Another Blog Entry http://johnsy.com/20060525103459 pgppWEeDyqB4E.pgp Description: PGP signature
Re: sftp file browsing
On Wed, 2006-05-31 at 09:19:09 +1000, Pete Johns sent: [A badly-formatted email] That should read: 20060318 using PSCP on Windows. N.B: Works best with Pageant. {{{ if ($OS =~Windows) let g:netrw_scp_cmd=\c:\\Program Files\\PuTTY\\pscp.exe\ -q Now with added SFTP: let g:netrw_sftp_cmd=\c:\\Program Files\\PuTTY\\psftp.exe\ endif }}} -- Pete Johns http://johnsy.com/ Tel/Fax numbers and IM information http://johnsy.com/contact/ Yet Another Blog Entry http://johnsy.com/20060525103459 pgpvw43hKOdlU.pgp Description: PGP signature
Re: Spellcheck in vim 7.0 doesn't seem to work
On Tue, 2006-05-16 at 09:52:29 +0100, Anthony Campbell sent: Thanks for the clarification. These commands work fine, which is what I was looking for. But :h spell produces information only about vimspell and vimspell commands. It does not give the information you supplied. I still don't see how you are supposed to locate that. Just some guesswork on my part... Looks to me like you have (at least the help for) a vimspell plugin loaded. Does :help spell-quickstart bring up a different helpfile? Hope this helps; --paj -- Pete Johns http://johnsy.com/ Tel/Fax numbers and IM information http://johnsy.com/contact/ Guy Kewney http://johnsy.com/20060515092823 pgpoB7VpdotM5.pgp Description: PGP signature
Re: Text - commandline
On Tue, 2006-05-16 at 18:45:52 +0200, Meino Christian Cramer sent: Hi, for what keyword I have to look in the online-help to find a hint how to copy any text from a buffer as any part of a command currently being edited in the commandline ? :help c_CTRL-R Hope this helps; --paj -- Pete Johns http://johnsy.com/ Tel/Fax numbers and IM information http://johnsy.com/contact/ Guy Kewney http://johnsy.com/20060515092823 pgp0v7M7PVfJS.pgp Description: PGP signature
Re: VIM7.0: How to switch off the spell check function? Thanks a lot.
On Tue, 2006-05-09 at 11:50:29 +0800, Japerlh sent: VIM7.0: How to switch off the spell check function? The following command can be used to switch on the spell check. What is the command to turn it off? :setlocal spell spelllang=en_us I have the following in my .vimrc: Toggle Vim v7.0 Spell-Checking. if (v:version = 700) set spell spelllang=en_au nnoremap F7 :set spell! spell?CR imap F7 c-oF7 vmap F7 c-oF7 endif Hope this helps; --paj -- Pete Johns http://johnsy.com/ Tel/Fax numbers and IM information http://johnsy.com/contact/ May The Fourth Be With You F...http://johnsy.com/20060504164831 pgp6lvGk15f1V.pgp Description: PGP signature