Re: cabbrev

2010-02-06 Thread Miklos Somogyi
Hello Gregor, Thank you, this is working nicely. I was looking at lots of things on the net, hoping that I find the definitions of things, but information was scattered around and examples contained as yet unknown things for me to chase. I don't know what, if any, difference is of and , betw

Re: Command from eval

2010-02-06 Thread Tom Link
> Is there a way to execute a command in an expression e.g. a string > passed to eval? Use :exec exec "cmd ". arg You might have to properly escape arg. The precise method depends on how the command interprets its arguments. -- You received this message from the "vim_use" maillist. For more

Command from eval

2010-02-06 Thread Sean DeNigris
Is there a way to execute a command in an expression e.g. a string passed to eval? Thanks. Sean DeNigris -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php

Re: How do I enable Ruby support in VIM

2010-02-06 Thread Sean DeNigris
> :echo has("ruby") > 0 > > How do I enable Ruby support?  This is needed for things like auto-complete, > right? Ruby has to be compiled in. I don't think you can enable it. -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php

Re: How do I enable Ruby support in VIM

2010-02-06 Thread Matt Wozniski
On Sat, Feb 6, 2010 at 9:33 PM, skm1001 wrote: > > I installed vim via apt-get on Ubuntu (had vim-tiny before).  I don't believe > I have Ruby support enabled. > > :echo has("ruby") > 0 > > How do I enable Ruby support? The vim-gnome package has Ruby support. > This is needed for things like auto

Re: cabbrev

2010-02-06 Thread Ben Fritz
On Feb 6, 5:02 pm, "John Beckett" wrote: > Miklos Somogyi wrote: > > cabbrev ;; :q! > > should quit a session but it does not. What's wrong? > > It's been explained that you need a mapping. > > However, that's a really dangerous thing to do! A key fumble > will quit with no warning and you might

How do I enable Ruby support in VIM

2010-02-06 Thread skm1001
I installed vim via apt-get on Ubuntu (had vim-tiny before). I don't believe I have Ruby support enabled. :echo has("ruby") 0 How do I enable Ruby support? This is needed for things like auto-complete, right? -- View this message in context: http://old.nabble.com/How-do-I-enable-Ruby-sup

Re: How to set vimrc for automatic retab and gggqG

2010-02-06 Thread Girish
On Feb 6, 3:55 pm, Matt Wozniski wrote: > On Sat, Feb 6, 2010 at 1:50 PM, Girish Venkatasubramanian wrote: *snip* > > To help this, I am considering mapping j and k (or the arrow keys) to > > gj and gk so that the scrolling happens from one line to the next > > virtual line and not from to the

RE: cabbrev

2010-02-06 Thread John Beckett
Miklos Somogyi wrote: > cabbrev ;; :q! > should quit a session but it does not. What's wrong? It's been explained that you need a mapping. However, that's a really dangerous thing to do! A key fumble will quit with no warning and you might lose work. Also, if you want an easy alternative to :q!

Re: set backupdir=/tmp rather than set nobackup ?

2010-02-06 Thread Benjamin R. Haskell
On Fri, 5 Feb 2010, John Little wrote: > > > I would like to have date.time stamped backups. > > > > How is that done within vim? > > This is the script I use presently: > > function! StampBackup() > let bup = globpath(&backupdir, expand('%:t') . &bex) > > [...] > > The obvious deficiency i

Re: set backupdir=/tmp rather than set nobackup ?

2010-02-06 Thread Bee
John Little wrote: > This is the script I use presently: > ... > augroup StampBackup > au! BufWritePost,FileWritePost * call StampBackup() > augroup END Thank you, really a stretch for me. I do not really understand, but can hack until working. Came up with the following which seems to work f

Re: How to set vimrc for automatic retab and gggqG

2010-02-06 Thread Matt Wozniski
On Sat, Feb 6, 2010 at 1:50 PM, Girish Venkatasubramanian wrote: > Thanks John - that took care of the retab issue. > > I have another question, though. > > I decided against setting a textwidth and formatoptions and au normal > gqG because of a couple of issues (see below). I am letting wordwrap >

Re: cabbrev

2010-02-06 Thread Ben Fritz
On Feb 6, 7:31 am, Miklos Somogyi wrote: > I got interested in vim's abbreviations. > > I can do double quotes for groff in insert mode, but I can not master > normal/command mode. > E.g. > > cabbrev ;; :q! > > should quit a session but it does not. What's wrong? You seem to be confused as to

Re: How to set vimrc for automatic retab and gggqG

2010-02-06 Thread Girish Venkatasubramanian
Thanks John - that took care of the retab issue. I have another question, though. I decided against setting a textwidth and formatoptions and au normal gqG because of a couple of issues (see below). I am letting wordwrap render the file according to the width of the terminal in which it is opened

Re: Control-

2010-02-06 Thread Paul
On Sun, Jan 31, 2010 at 01:33:16PM -0500, Benjamin R. Haskell wrote: > I'm using mlterm, but XTERM is set to 'xterm'. When I set it to > 'mlterm', I get the same behaviour. It works when I run vim from > xterm, though, both when TERM is 'xterm' and 'mlterm'. I assume that "XTERM" is a typo and

Re: cabbrev

2010-02-06 Thread Gregor Uhlenheuer
Miklos Somogyi schrieb: > Hello Folks, > > I am familiar with vi but new to vim. I used to use the map instruction to do > a lot of goodies for me. > However, my new keyboard (diNovo Edge for Mac) would not let me program the > function keys, so > I got interested in vim's abbreviations. > > I

Re: set backupdir=/tmp rather than set nobackup ?

2010-02-06 Thread Spencer Collyer
On Thu, 4 Feb 2010 10:28:18 -0800, John Magolske wrote: > To avoid accumulating backup files, I have in my vimrc: > > set writebackup > set nobackup > > Which makes a backup before overwriting a file & removes the backup > after the file is successfully written. I'm considering using this > i

cabbrev

2010-02-06 Thread Miklos Somogyi
Hello Folks, I am familiar with vi but new to vim. I used to use the map instruction to do a lot of goodies for me. However, my new keyboard (diNovo Edge for Mac) would not let me program the function keys, so I got interested in vim's abbreviations. I can do double quotes for groff in insert m

Re: Vim Tips wiki

2010-02-06 Thread Raúl Núñez de Arenas Coronado
Saluton John :) John Beckett skribis: > Mailing list news (vim_use): Something must have hit the spammers > (global financial crisis!?) because the moderators are seeing a > drastic reduction in the number of spam attempts. Yes, that's right. I think that spam dropped a lot since this year start

Re: How to set vimrc for automatic retab and gggqG

2010-02-06 Thread John Little
On Feb 6, 2:25 pm, Girish Venkatasubramanian wrote: > 1) Automatic retab ... > if &modifiable > if has("autocmd") > au BufReadPost * retab > endif > endif > > but still executing "help:retab" complains... You're testing modifiable at start up, you want to test it when the auto command