Tuesday, February 1, 2011

for list

Hello,

How is the syntax to a for list with constants

e.g.

let mydb = "db1 db2 db3"
for db in mydb
source db.dict
end


Thank You
Joachim

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Re: Present For You

Note: this is spam, don't click on the link (which I obfuscated).

> I really like this http://ilovSPAMon.com/inSPAMtml Hope u too!

--
hundred-and-one symptoms of being an internet addict:
169. You hire a housekeeper for your home page.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Re: Remapping CTRL-I to

On Fri, Jan 28, 2011 at 07:37:17AM +0100, Christophe-Marie Duquesne wrote:
> On Fri, Jan 28, 2011 at 6:52 AM, Ben Schmidt
> <mail_ben_schmidt@yahoo.com.au> wrote:
> > On 28/01/11 3:56 PM, Chris Jones wrote:
> >>
> >> Is it possible to remap CTRL-I to 'Escape' in insert mode without
> >> remapping<Tab>  at the same time?
>
> I think using an external tool such as xmodmap, you could remap <c-i>
> to <esc>, but this solution would affect the whole system.

Originally to compensate for a uselessly small laptop ESC key, I long
ago remapped "Caps Lock" to ESC:

To change CAPS_LOCK to ESCAPE, put into ~/.Xmodmap:
keycode 0x42 = Escape
clear Lock # Disable Caps-Lock

Now I use it on desktops as well, because I've never found a use for
"Caps Lock" [1]. Since ESC is used so much in vim, it seems useful to have
it on a single key. Consistent behaviour across all applications is an
advantage, I find.

YMMV (by a large margin ;-)

Erik

[1] If ever a long shouting heading were needed, there are several vim
ways to convert after input.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Re: Determining if Vim is running in text-console mode or X Windows

On Tue, Feb 1, 2011 at 3:30 PM, Christian Brabandt <cblists@256bit.org> wrote:
[snip]

> So you basically distinguish it by inspecting your $TERM variable. First
> determine in both situations what your $TERM is set to, then put something
> like this in your .vimrc

Ah, I mis-read the post. Clearer now :)

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Re: Determining if Vim is running in text-console mode or X Windows

On Tue, February 1, 2011 10:23 am, Steve Laurie wrote:
> Hi,
>
> I've searched Vim help and Google as well as done lots of
> experimentation with no luck.
>
> Basically, what I'm trying to do is put something in my .vimrc file that
> can determine if I'm starting Vim in text-console mode or in
> gnome-terminal.
>
> The reason I need to do this is because I log into FreeBSD in
> text-console. If I go into Xorg, I use startx and I use gnome-terminal
> in Window Maker.
>
> I need to determine if I'm in text-console mode so I can set the term
> setting in my .vimrc file to cons25 and if I startx, I need to set
> t_Co=256, term to xterm-256color and set the theme to a nice 256 color
> theme.
> If I try to use the color settings in console mode, the screen turns red
> and the text flashes.
>
>
> I've tried the following:
>
> if has("x11")
> set term=xterm-256color
> set t_Co=256
> colorscheme calmar256-dark
> else
> set term=cons25
> colorscheme myvim
> endif
>
> This didn't work. I've also tried:
> if has("gui_running")
> if has("gui_gtk2")
>
> nothing works. I've even tried the reverse ways like "if !has", but
> still, no luck.
>
>
> Can someone help me out on this?

So you basically distinguish it by inspecting your $TERM variable. First
determine in both situations what your $TERM is set to, then put something
like this in your .vimrc

if &term=~'linux'
" This is the console on linux. I don't know for FreeBSD
" set your console settings here.
elseif &term=~'xterm'
" Put your settings for X11 mode here
endif

regards,
Christian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Re: Determining if Vim is running in text-console mode or X Windows

On Tue, Feb 1, 2011 at 2:53 PM, Steve Laurie <mr.steven.laurie@gmail.com> wrote:
> Hi,
>
> I've searched Vim help and Google as well as done lots of experimentation
> with no luck.
>
> Basically, what I'm trying to do is put something in my .vimrc file that can
> determine if I'm starting Vim in text-console mode or in gnome-terminal.

> The reason I need to do this is because I log into FreeBSD in text-console.
> If I go into Xorg, I use startx and I use gnome-terminal in Window Maker.
Why not keep GUI specific settings .gvimrc? Let .vimrc have only the
settings that are common to both GUI/text versions..

>
> I need to determine if I'm in text-console mode so I can set the term
> setting in my .vimrc file to cons25 and if I startx, I need to set t_Co=256,
> term to xterm-256color and set the theme to a nice 256 color theme.
> If I try to use the color settings in console mode, the screen turns red and
> the text flashes.
>
>
> I've tried the following:
>
> if has("x11")
>    set term=xterm-256color
>    set t_Co=256
>    colorscheme calmar256-dark
> else
>    set term=cons25
>    colorscheme myvim
> endif
>
> This didn't work. I've also tried:
> if has("gui_running")
> if has("gui_gtk2")
>
> nothing works. I've even tried the reverse ways like "if !has", but still,
> no luck.

if has("gui") ?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Determining if Vim is running in text-console mode or X Windows

Hi,

I've searched Vim help and Google as well as done lots of
experimentation with no luck.

Basically, what I'm trying to do is put something in my .vimrc file that
can determine if I'm starting Vim in text-console mode or in gnome-terminal.

The reason I need to do this is because I log into FreeBSD in
text-console. If I go into Xorg, I use startx and I use gnome-terminal
in Window Maker.

I need to determine if I'm in text-console mode so I can set the term
setting in my .vimrc file to cons25 and if I startx, I need to set
t_Co=256, term to xterm-256color and set the theme to a nice 256 color
theme.
If I try to use the color settings in console mode, the screen turns red
and the text flashes.


I've tried the following:

if has("x11")
set term=xterm-256color
set t_Co=256
colorscheme calmar256-dark
else
set term=cons25
colorscheme myvim
endif

This didn't work. I've also tried:
if has("gui_running")
if has("gui_gtk2")

nothing works. I've even tried the reverse ways like "if !has", but
still, no luck.


Can someone help me out on this?

TIA,
Steve Laurie


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php