Re: Vimdiff with multiple buffers

2016-01-22 Thread Simon Ruderich
On Thu, Jan 21, 2016 at 02:53:04PM -0500, Ven Tadipatri wrote: > Hmm...I guess I should have read the manual first. > :diffget > seems to do the trick. So to answer my own question, I would do > :diffget 1 for the one on the left > and :diffget 3 for the one on the right. > But if anyone has any

Re: Excluding autocommands for files matching an exclusion pattern

2015-10-15 Thread Simon Ruderich
On Thu, Oct 15, 2015 at 01:38:21AM -0400, VML VWS wrote: > Hi Tony, > > Reading :h , I'm unable to tell whether would be the > basename or the full pathname of the matched file. Could you say? According to :h it's in this case which is only the file name. Regards Simon -- + privacy is

Re: Switching off auto-indent within vim script...

2015-10-09 Thread Simon Ruderich
On Fri, Oct 09, 2015 at 06:27:15PM +1100, Erik Christiansen wrote: > (That was "*p in old Vim versions, IIRC.) Are you sure? According to the Vim help, "* is the primary X selection and "+ is the X clipboard. Regards Simon -- + privacy is necessary + using gnupg http://gnupg.org + public key

Re: vim with servername as default editor in zsh

2015-10-09 Thread Simon Ruderich
On Fri, Oct 09, 2015 at 10:44:27AM -0700, Enno wrote: > I'd like 'edit' in zsh to start vim with v:servername = VIM. Hello, What is this `edit` binary? Maybe it's just a symlink to vim. Regards Simon -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9

Re: set comments for C-style comment

2012-09-03 Thread Simon Ruderich
On Sun, Sep 02, 2012 at 04:49:00PM -0700, Monnand wrote: Hi all, I am using a language whose comment is same as C's. So I copied some lines from c.vim so that my vim could automatically insert a comment after a newline in the middle of the comment. More precisely, I added the two following

Re: set comments for C-style comment

2012-09-03 Thread Simon Ruderich
On Mon, Sep 03, 2012 at 02:11:59PM -0700, Monnand wrote: Thank you, Simon. I think they are executed. here is the output of :verbose set fo? comments?: formatoptions=croq Last set from ~/.vim/bundle/vim-golang/indent/go.vim comments=sO:* -,mO:* ,exO:*/,s1:/*,mb:*,ex:*/,://

Re: How do I define function for toggling textwidth (and echoing along)?

2012-08-25 Thread Simon Ruderich
On Sat, Aug 25, 2012 at 02:37:43PM +0530, Santosh Kumar wrote: [snip] Currently I have this mapping: nnoremap silent leadertw :exe set textwidth= . (tw ? 0 : 78)cr This does the work but I don't get notified if the work has been done. All I want is along with toggling the setting I should

Re: defining imap that calls performs second call if cursor didn't move

2012-08-22 Thread Simon Ruderich
On Mon, Aug 20, 2012 at 08:58:24PM -0700, skeept wrote: Thanks for the help, I still have some issues. I cannot make the first mapping work properly when called from the function, so I cannot make the hole thing work. Right now just for the first mapping the function looks like: function!

Re: gedit to gvim/vim teething issues

2012-08-22 Thread Simon Ruderich
On Wed, Aug 22, 2012 at 06:49:06PM -0500, Tim Chase wrote: [snip] which modified file do you want. I'll often instruct Vim to ignore the file on disk, yank the entire contents (:%y) and paste them in a new buffer (:vnew, PGdd), go back to the original file and force a reload of it (:e!) to

Re: gedit to gvim/vim teething issues

2012-08-22 Thread Simon Ruderich
On Wed, Aug 22, 2012 at 08:02:06PM -0500, Tim Chase wrote: I'm familiar with :DiffOrig and even use it occasionally. But when something unexpected happens, I tend to prefer to do each step manually to make sure I know exactly what's happening at each point along the way to ensure that all my

Re: paste works once, register then garbled

2012-08-16 Thread Simon Ruderich
On Thu, Aug 16, 2012 at 11:41:24AM +0200, Niels Grundtvig Nielsen wrote: 1. copy block of text to register *a* with ay6 2. record macro sequence Which register did you use to record the macro sequence? If you used qa, then the macro is stored in register a - therefore destroying the original

Re: vim: bind ctrl+shift+aletter

2012-08-13 Thread Simon Ruderich
On Thu, Aug 09, 2012 at 05:16:42PM -0400, ping wrote: so quick conclusion is: no way for ctrl-shift-c/v(like in gnome) fn is the only choice (but not convenient) That's not entirely correct. You can configure your terminal emulator to send a different keycode for ctrl-shift-c/v if your

Re: where to put this script

2012-08-13 Thread Simon Ruderich
On Mon, Aug 13, 2012 at 01:23:32PM -0700, Bee wrote: I use a perl script to align columns: http://entable.s3.amazonaws.com/index.html from vim :!./entable which works great. I have a function that does a cd then executes the range for entable. I do not want to add the path to entable, so

Re: Display more characters as one

2012-07-29 Thread Simon Ruderich
On Sun, Jul 29, 2012 at 11:10:44AM -0700, jachymb wrote: But maybe one more question to this topic, though: Is it possible to create different conceal classes? I mean, when I do some syntax mathching with conceal, I have to link the conceal to only one syntax type like this: hi! link Conceal

Re: Display more characters as one

2012-07-28 Thread Simon Ruderich
On Sat, Jul 28, 2012 at 03:32:11AM -0700, jachymb wrote: Hello, everybody! This is my first post here. Welcome ;-) I stumbled upon the following feature in the haskell editor yi, I am curious if there is something simillar possible in vim (or a plugin for it). The idea is quite simple:

Re: vim: remember search ex cmd history across vim reload

2012-07-14 Thread Simon Ruderich
On Fri, Jul 13, 2012 at 05:08:15PM -0400, ping wrote: hi: I kind of forgot somewhere (maybe user-manual) I saw a way to make vim remember all search ex cmd history, across vim instances, even remember all history info after a vim reload. but I couldn't find out how. is it viminfo

Re: vim: session of sessions

2012-07-13 Thread Simon Ruderich
On Thu, Jul 12, 2012 at 11:04:38PM +0100, Thomas Adam wrote: On 12 July 2012 21:12, Simon Ruderich wrote: Btw. I haven't found a good way to perform the same in tmux, suggestions are very welcome. choose-window choose-tree Sorry, I wasn't precise enough. I'm looking for a way to use

Re: vim: session of sessions

2012-07-12 Thread Simon Ruderich
On Wed, Jul 11, 2012 at 03:25:58PM -0400, ping wrote: [snip] * switching beyond 9 windows is painful in screen, if you ever use it. I know you wanted to look at the Vim-side of the problem, but switching to windows 9 in GNU screen really is painful. The following mapping helps me handling my

Re: How to map { properly in coding

2011-03-28 Thread Simon Ruderich
On Mon, Mar 28, 2011 at 11:30:31PM +0800, wei gao wrote: Hi, Is there any convinent way to map { to the following code snips: { //put cursor here } Thanks! Wei You might want to try a real snippet engine. For example xptemplate [1] (very powerful, but a little confusing at first)

Re: Fold by timestamp?

2011-03-22 Thread Simon Ruderich
On Tue, Mar 22, 2011 at 08:25:22AM +0100, Christian Brabandt wrote: 2. The [Other info] in the example is info I don't really care about. Is there a concept of a vertical fold/any way to hid the [Other info] fields? No. Well you could use the conceal feature to hide the [Other info] text.

Re: File type not remembered when switching buffers

2011-03-18 Thread Simon Ruderich
On Fri, Mar 18, 2011 at 01:12:44PM +0100, Marco wrote: When often edit files where the filetype detection fails. The files are detected as »conf« instead of »gnuplot« for instance. I can set ft=gnuplot, but when I switch to another buffer and switch back, it falls back to »conf«, including the

Re: vim --remote over ssh -X

2011-01-03 Thread Simon Ruderich
On Mon, Jan 03, 2011 at 01:02:20PM +0100, Bastian Venthur wrote: [snip] Yeah, I know. I just happen to find it more convenient to browse the FS with my shell and open files with gvim --remote as needed. The question [snip] Hi Bastian, I can recommend sshfs. It uses FUSE and lets you mount

Re: wm and tw cause formatting problem

2010-11-02 Thread Simon Ruderich
On Tue, Nov 02, 2010 at 04:03:51PM +, Anthony Campbell wrote: In insert mode, if a line starts with - the next line is indented. This is not what I want. After a lot of experimenting, I found that it was because either textwidth or wrapmargin was set to a non-zero value. Is there any way

Re: replace selected region only

2010-10-24 Thread Simon Ruderich
On Sun, Oct 24, 2010 at 03:46:45PM +0900, 김태윤 wrote: hello I am gvim beginner today, I try to replace text only in selected area with gvim I alt+select the region where to be replaced. it works. To select a region you use V or Ctrl-V. I've no idea what alt+select does (never used GVim),

Re: Help with paragraph checks

2010-10-17 Thread Simon Ruderich
On Sun, Oct 17, 2010 at 05:59:03AM -0700, parag wrote: [snip] So that when I can use the % character to go to the end of a code segment ( ie to the next end ) Try the matchit plugin [1]. It supports arbitrary start/end tags. Useful for HTML/Python/etc. as well. Simon [1]:

Re: grep quickfix window question

2010-10-16 Thread Simon Ruderich
On Fri, Oct 15, 2010 at 06:34:55PM +0400, ZyX wrote: And what is preventing you from deleting the old text in the mail, if it isn't needed? It requires more work then moving needed text up. Then please use an editor which makes handling text simple, like Vim. d} doesn't take very long. And

Re: How to set utf-8 locally (for a buffer) on loading the file

2010-10-05 Thread Simon Ruderich
On Mon, Oct 04, 2010 at 10:22:44PM -0700, esquifit wrote: [snip] NOTE: Changing this option will not change the encoding of the existing text in Vim. It may cause non-ASCII text to become invalid. This sentence is somewhat obscure. If I change 'encoding' after having loading a

Re: Calling xmltidy for vim/macvim

2010-09-30 Thread Simon Ruderich
On Wed, Sep 29, 2010 at 10:22:11PM -0500, Russell Urquhart wrote: Hi, Does anyone have any info on how to use xmltidy with macvim and/or vim? I'm sure this is doable i just need some info! Thanks, Russ If you want to run xmltidy on the current buffer, use :%!xmltidy (I've never used

Re: gvim, how to search tab by name and then go to this tab?

2010-09-30 Thread Simon Ruderich
On Thu, Sep 30, 2010 at 11:24:52PM +0800, Zac Lee wrote: gvim, how to search tab by name and then go to this tab? You shouldn't use tabs like in other text editors. To quote vimgor (the bot) in #vim: tabs Tab pages are not buffers, don't try to force them to act like buffers.

Re: Question on completion in vim command window

2010-09-27 Thread Simon Ruderich
On Mon, Sep 27, 2010 at 08:30:02AM +0200, Eran Borovik wrote: Thanks. That's exactly what I needed!! And if you're already in command mode, use C-F to open the window. Simon -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9 pgpYjL0h0xZoY.pgp

Re: Compiling gvim on Debian

2010-09-22 Thread Simon Ruderich
On Wed, Sep 22, 2010 at 12:17:31PM +0200, Matteo Riva wrote: 2010/9/22 Dominique Pellé : Thanks for both these suggestion, I completely forgot to check the enabled features and actually some are missing compared to my usual setup (e.g. perl). If you want to compile more packages it's a good

Re: to or till (f or t) a non-ascii character

2010-09-22 Thread Simon Ruderich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Wed, Sep 22, 2010 at 02:08:27PM +1000, Ramana Kumar wrote: Wow I never know what q: was for. Looks cool! My iabbrevs even work in there. If you already typed something in command mode (: ..), pressing C-F also opens this window. Regards,

Re: to or till (f or t) a non-ascii character

2010-09-22 Thread Simon Ruderich
On Wed, Sep 22, 2010 at 04:45:48PM +1000, Ramana Kumar wrote: Digraphs look like an awesome solution; I just need to add a few more maps to the digraph table. :h digraphs Adding digraphs is simple, you can however only create digraphs consisting of two trigger characters. Simon -- + privacy

Re: Execute commands in new window

2010-09-15 Thread Simon Ruderich
On Wed, Sep 15, 2010 at 05:14:13PM -0400, Ven Tadipatri wrote: Yeah the \r in the replace part worked. That's really weird, because though it does the right behavior, after the replace, if I search for \r it says it can't find it, so somehow it translates \r in the replace clause to \n in the

Re: Error When Opening an Perl Script

2010-09-14 Thread Simon Ruderich
On Tue, Sep 14, 2010 at 02:53:42PM +0800, Dennis Cao wrote: [snip] I'm not sure what exactly happened here, but please don't send any weird UTF-8 characters just because you can. Simon -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9

Re: Return } to previous indent

2010-09-13 Thread Simon Ruderich
On Mon, Sep 13, 2010 at 10:53:20AM +0200, Dotan Cohen wrote: I have smartindent set, but I'd like VIM to return to the previous indentation (back four spaces) when } (close block) is pressed. Is this possible? The terrific Kate (KDE text editor) and even the MS Visual Studio series have this

Re: Show the list of the file in vim just like the catgs list, how to do ?

2010-09-11 Thread Simon Ruderich
On Sat, Sep 11, 2010 at 12:24:48AM -0700, caruso_g wrote: NERDTree is mouse free. ctrl+w+w to move to the NERDTree pane. Move around Vim way and o to open a vertical split window of the file or t to open the file silently in a tab, or s to open is split and so on. Just look at NERDTree help

Re: Show the list of the file in vim just like the catgs list, how to do ?

2010-09-10 Thread Simon Ruderich
On Thu, Sep 09, 2010 at 08:07:41PM -0300, Daniel Corrêa wrote: i have ever seen the file list in gvim that let you point it and open the file that you choose by mouse , Check out the NERDTree plugin from Vim's site, it does have mouse support. But if possible try to find a non-mouse way.

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-09 Thread Simon Ruderich
On Thu, Sep 09, 2010 at 01:06:39PM -0700, Rahul wrote: [snip] How do I enable the conceal option at compile time? I tried './ configure --enable-conceal' but doesn't work. Or do I have to actually pull the patches from the conceal developers website? I am confused! Any tips? You need to

Re: convenient settings for /etc/motd etc. that has multi-character color codes

2010-09-07 Thread Simon Ruderich
On Tue, Sep 07, 2010 at 01:26:32PM -0700, Rahul wrote: Is there a convenient way to edit /etc/motd (or for that matter any other file that has color codes / multibyte characters in it)? The usual problem is that many if the file has a color code (say, ^[[33m^[[1m ) then this occupies multiple

Re: History doesn't work !

2010-08-27 Thread Simon Ruderich
On Fri, Aug 27, 2010 at 02:17:34PM -0700, Tintin72 wrote: Did you use sudo vim instead of sudo -e ? Yes I did. I don't know sudo -e. What it's about ? man sudo will tell you. It runs the editor as a normal user on a temporary file. Then sudo writes the content to the real file. It should be

Re: Use of buffer

2010-08-20 Thread Simon Ruderich
On Thu, Aug 19, 2010 at 11:36:41AM +0200, Marc Weber wrote: I map m-1 m-2 to tab 1,2 etc. This way I have O(1) access to 3 files or more I'm currently focusing on. m-X key jump to tab X for i in range(1,8) exec 'map m-'.i.' '.i.'gt' endfor I have similar bindings. However :b also works

Re: CTRL-p and tex

2009-10-08 Thread Simon Ruderich
On Thu, Oct 08, 2009 at 10:48:11AM +0200, Keyan wrote: hi, i have the following problem. for citations keys, my current tool auto- generates keys like: AuthorYearFirst-Second-ThirdWordOfTitle i like to complete words with CRLT-p, which does not function in this case. is there a nice an

Re: Replace Just Needed

2009-08-30 Thread Simon Ruderich
On Sat, Aug 29, 2009 at 09:57:58PM +0800, bill lam wrote: I added a vim macro inside ~/.vimrc function! Tofu() call search('^$') if 1 line(.) 2,/^$/-1!sed -e 's/^ //' | t-prot -(your options here) | sed -e 's/^/ /' +/^$/ endif endfunction Hi Bill, Thanks for this snippet,

Re: Replace Just Needed

2009-08-29 Thread Simon Ruderich
On Sat, Aug 29, 2009 at 02:34:11PM +0200, Christian Brabandt wrote: Hi Simon! Thanks for the info. You could probably also simply filter you mail through t-prot when editing in vim. regards, Christian Hi Christian, Thanks for the hint. I totally missed this simple but best way ;-) Simon

Re: Replace Just Needed

2009-08-29 Thread Simon Ruderich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Sat, Aug 29, 2009 at 12:32:31PM +0800, bill lam wrote: On Fri, 28 Aug 2009, Simon Ruderich wrote: There is a patch on the t-prot page to also use it when replying [1]. It's also described on the t-prot page (scroll down a bit) [2

Re: Replace Just Needed

2009-08-28 Thread Simon Ruderich
On Fri, Aug 28, 2009 at 09:37:55AM +0200, Christian Brabandt wrote: Hi Simon! On Mi, 26 Aug 2009, Simon Ruderich wrote: On Wed, Aug 26, 2009 at 09:44:10PM +0800, bill lam wrote: Was it configurable to delete TOFU automatically in un-modified mutt? Not AFAIK. But there's t-prot

Re: Replace Just Needed

2009-08-26 Thread Simon Ruderich
On Wed, Aug 26, 2009 at 09:44:10PM +0800, bill lam wrote: On Wed, 26 Aug 2009, Christian Brabandt wrote: [deleted TOFU] Was it configurable to delete TOFU automatically in un-modified mutt? Not AFAIK. But there's t-prot and of course manual editing. Simon -- + privacy is necessary +

Re: How to install plugins in MacVim

2009-08-09 Thread Simon Ruderich
On Sat, Aug 08, 2009 at 11:53:00PM -0700, caruso_g wrote: Hi, I am trying to install some plugins into MacVim, I created the folder ~/.vim and I put the plugin into it. But they do not load. Did you quit MacVim and restart it? That's necessary if you have enabled the quickstart option so the

Re: How to install plugins in MacVim

2009-08-09 Thread Simon Ruderich
On Sun, Aug 09, 2009 at 09:45:58AM -0700, caruso_g wrote: Ok, I want to show you a specific scenario I faced. I downloaded the Textile plugin, http://www.vim.org/scripts/script.php?script_id=164 The plugin with this link isn't a Textile plugin but a HTML plugin. , then I unpacked it into

Re: error setting up Vim on Mac

2009-08-08 Thread Simon Ruderich
On Fri, Jul 31, 2009 at 11:30:01AM -0700, mitch wrote: I'm trying to set Vim as the default application to open a file on the Mac. I can't, it says You cannot change the item foo.txt to always open in the selected application. The item is either locked or damaged or in a folder you don't

Re: Text formatting tools

2009-07-10 Thread Simon Ruderich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Thu, Jul 09, 2009 at 11:17:36AM +0200, Carsten Agger wrote: [snip] Till now, I've been happy with my small view as HTML script, but with the more elaborate structure needed in a book I'm beginning to feel its limitations. Thanks in

Re: how to write output of il to a file

2009-05-27 Thread Simon Ruderich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Wed, May 27, 2009 at 08:31:55AM -0700, Bee wrote: How can I write the output of :il /pattern/ or other such results to a file? :help redir :redir file :silent il /pattern/ :redir END Simon - -- + privacy is necessary + using

Re: Markdown and its file extentions

2009-05-26 Thread Simon Ruderich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Tue, May 26, 2009 at 04:18:16PM +0900, Hunt Jon wrote: I would like to use Markdown and found http://plasticboy.com/markdown-vim-mode/ I need to have file extensions as .mdown, .markdown and .md, which are supported in GitHub and

Re: omnicomplete and CSS

2009-05-25 Thread Simon Ruderich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Mon, May 25, 2009 at 10:51:29AM +0300, Nicolas Aggelidis wrote: Thanks for your help matt and per! Matt your are probably right, but how can i see which plugin mapped the C-x? -nicolas :verbose map! Simon - -- + privacy is necessary +

Re: wrong highliting in terminal on git-commit message

2008-12-02 Thread Simon Ruderich
On Mon, Dec 01, 2008 at 01:04:12PM -0500, Matt Wozniski wrote: Or, much nicer, adding hi def link gitcommitSummary Normal hi def link gitcommitBlank Normal to your ~/.vimrc - same effect, but the changes won't be reverted next time gitcommit.vim is upgraded. ~Matt That is much better,

Re: wrong highliting in terminal on git-commit message

2008-12-01 Thread Simon Ruderich
On Mon, Dec 01, 2008 at 04:11:29AM -0800, snitko wrote: Here's a screenshot: http://dl.getdropbox.com/u/113891/pics/vim_commit_message.png The commit message was always highlighted with white color, but recently it has turned into this weird thing. The color scheme file hasn't changed. How