Thursday, December 31, 2009

Re: How to compile with guifont ?

On 30/11/09 14:59, Timothy Madden wrote:
> Hello
>
> I compiled vim on a debian server and installed in in my home folder
> (~/usr/local),
> but the resulting executable can see no fonts when I press Tab on
> :set guifont=<Tab>
> and the default font is looking too condensed. The Edit menu has no GUI
> Font entry.
>
> I use ssh -Y to run gvim on my local desktop (with Ubuntu 9.10).
>
> fc-list shows many, many
> fonts installed (also locally in my home folder) on the server, and the
> desktop machine also
> has a GUI desktop with all the fonts.
>
> My :version is
> :version
> VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Nov 27 2009 14:45:34)
> Compiled by adrianc@web3.storm.lan
> Normal version with X11-Athena GUI. Features included (+) or not (-):
[...]

Any Vim GUI can set the font; the problem is that only some of them (not
including yours, apparently) can tell you from which fonts it is
possible to choose. So you'll have to guess.

If you have the LucidaTypewriter font installed (on the computer where
gvim is running), you might try

:set gfn=-*-lucidatypewriter-medium-r-normal-*-*-90-*-*-m-*-*

or else, if you have a Courier font installed there, you might try

:set gfn=-*-courier-medium-r-normal-*-*-90-*-*-m-*-*

(where 90 is the size, in tenths of point I think: the larger the
number, the bigger the font). Similarly for other font faces: I'm just
mentioning these two because they are fairly common, so there's a
substantial chance that you've got them. The -m- near the end is
essential: it means "monotype" (i.e. fixed-width); Vim won't use any
other kind of font (except on GTK2, where other kinds look ugly anyway).

Note that if in the meantime you have installed a GTK2 version of Vim,
the above settings won't work (but GTK2 gvim has the nice ":set gfn=*"
menu, so this whole discussion is moot in that case).

For more details, including how to set the font in a vimrc which is to
be used on various versions of gvim and possibly on various OSes, see
http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI


Best regards,
Tony.
--
To understand this important story, you have to understand how the
telephone company works. Your telephone is connected to a local
computer, which is in turn connected to a regional computer, which is
in turn connected to a loudspeaker the size of a garbage truck on the
lawn of Edna A. Bargewater of Lawrence, Kan.

Whenever you talk on the phone, your local computer listens in. If it
suspects you're going to discuss an intimate topic, it notifies the
computer above it, which listens in and decides whether to alert the
one above it, until finally, if you really humiliate yourself, maybe
break down in tears and tell your closest friend about a sordid
incident from your past involving a seedy motel, a neighbor's spouse,
an entire religious order, a garden hose and six quarts of tapioca
pudding, the top computer feeds your conversation into Edna's
loudspeaker, and she and her friends come out on the porch to listen
and drink gin and laugh themselves silly.
-- Dave Barry, "Won't It Be Just Great Owning Our Own
Phones?"

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: conflicting options: smartindent & 'fo+=a'

On 01/01/10 03:10, Linda W wrote:
> I am trying to insert a bunch of ugly text in 'css', and using
> syntax='css', si, (tried w/ai& /noai), and using formatoptions
> tag 'a'.
>
> I'm running into a minor conflict versus what I expect.
>
> Any time a line starts with a '.', everything gets indented
> a further level (even though there's no nesting).
>
> As near as I can tell, what's happening is this:
>
> input:
> ---
> .sel {
> blah;
> blah2;
> }
>
> .sel2 {
> bbb;
> ccc;
> }
>
> next {
> xxx;
> }
> ---
> becomes:
> .sel { blah;
> blah2; }
>
> .sel2 { bbb;
> ccc; }
>
> next { xxx; }
> -----------
>
> The closing brace's for '.sel' and '.sel2' are not being matched
> by the 'autoindent' algorith. Reason: 'ai' looks for closing
> brace in column 1 -- which it IS, in the input. However the 'fo+=a'
> option apparently gets a hold of the closing brace before 'ai'
> sees it and it puts it on the previous line (thus no longer in
> column 1). So 'ai' never sees the closing quote.
>
> What eventually caused (causes) the indent to be reset is
> a css "ID" selector definition. CSS id selector definitions
> start with '#'. Vim, of course, believes it to be a
> comment, and sets the indent from what is then about '60' back
> to 0.
>
> Um...
> Observations.
>
> Apparently the setting of 'syntax=' doesn't really effect a mode
> switch as far as actual input, but only affects coloring?
>
> Sigh.
>
> How unreasonable would it be for me to want 'syntax' settings to
> also apply to how 'si' and inserting "#" and indent keywords and
> ...well, whatever other auto-formatting features are in vim.
>
> Is that something that would need to be done on a syntax-by-syntax
> file basis?
>
> ==OR== is expecting (or wanting) that to be done in syntax
> files overloading 'syntax' files -- as they are only designed for
> visual syntax hilighting and not modifying vim's input parameters to
> be congruent with the visual syntax?
> I.e. is a 'input-syntax' file type needed? (I'd sorta hope not,
> but I ask) The only reason I ask is based on whether or not it
> is common or expected that current syntax files should
> adjust vim's other options (I'm guessing not (?)). If it's
> not common nor expected, then there's a "whole" people aren't
> expecting a 2nd input file to be written or provided to change
> input options, BUT, neither is it being provided in the current
> syntax file collection (maybe there are exceptions?)
>
> I don't suppose there are any easy ways around problems like this?
> I.e. I can set manual options here and there by figure out what the
> settings are for my particular circumstance, but that doesn't solve
> the general problem (nor do I think I'm sufficiently versed in
> the various options to solve such a general problem).
>
> Ideas? Comments? Is this a 'feature deficiency'? :-)
> Is it something that is fixable (from a design point of view,
> apart from the work needed add the changes for the various
> supported syntaxes). Should it be become some future standard
> for syntax files to (optionally) set all the input options
> associated with a particular syntax?
>
> Am I missing some setting that would just 'do the right thing'? :-)
>

The 'syntax' option, and the syntax plugins, only affect highlighting
(colouring, but also bolding, underlining, etc.), or rather, where
highlighted text starts and ends. (A colorscheme may define the actual
colors, unless you use the "default colours" compiled into Vim). That's
intentional.

The 'filetype' option affects the rest: indenting via an indent plugin
and a number of options like 'lisp', 'cindent', 'autoindent',
'smartindent', 'indentexpr', and I'm not sure I din't omit one or two;
the rest via a filetype-plugin.

If your vimrc includes both "filetype plugin indent on" and "syntax on"
(or if it sources the vimrc_example.vim, which issues both of these
commands) you get all three types of plugins loaded whenever you edit a
new file. Otherwise, depending on what you use in your vimrc, maybe you
get only part of them.

The syntax file for CSS should know that comments (blue text by default)
may start with /* or maybe with // but never with #, and IIUC, the
filetype-plugin should set the 'comments' option accordingly and the
indent-plugin set up indenting so that, for instance, CSS opening and
closing braces get balanced indent and outdent.


If you have used the above-mentioned commands in your vimrc, then
starting to edit a file recognized as CSS (probably because is name ends
in .css) will cause Vim to apply all three types of plugins to it
without further action; but if you start editing an empty [NoName] file,
Vim cannot read your mind to know that you mean it to be a CSS style
sheet, and setting 'syntax' to CSS isn't enough. The recommended way of
doing things is to give your file a CSS name right at the start; or
else, if you never intend to save the file, setting 'filetype' to css
(which will also set 'syntax') (or setting it to html etc. for an
embedded style sheet) will cause your style rules to be recognized as
what they are.


Best regards,
Tony.
--
Did you know that clones never use mirrors?
-- Ambrose Bierce, "The Devil's Dictionary"

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

conflicting options: smartindent & 'fo+=a'

I am trying to insert a bunch of ugly text in 'css', and using
syntax='css', si, (tried w/ai & /noai), and using formatoptions
tag 'a'.

I'm running into a minor conflict versus what I expect.

Any time a line starts with a '.', everything gets indented
a further level (even though there's no nesting).

As near as I can tell, what's happening is this:

input:
---
.sel {
blah;
blah2;
}

.sel2 {
bbb;
ccc;
}

next {
xxx;
}
---
becomes:
.sel { blah;
blah2; }

.sel2 { bbb;
ccc; }

next { xxx; }
-----------

The closing brace's for '.sel' and '.sel2' are not being matched
by the 'autoindent' algorith. Reason: 'ai' looks for closing
brace in column 1 -- which it IS, in the input. However the 'fo+=a'
option apparently gets a hold of the closing brace before 'ai'
sees it and it puts it on the previous line (thus no longer in
column 1). So 'ai' never sees the closing quote.

What eventually caused (causes) the indent to be reset is
a css "ID" selector definition. CSS id selector definitions
start with '#'. Vim, of course, believes it to be a
comment, and sets the indent from what is then about '60' back
to 0.

Um...
Observations.

Apparently the setting of 'syntax=' doesn't really effect a mode
switch as far as actual input, but only affects coloring?

Sigh.

How unreasonable would it be for me to want 'syntax' settings to
also apply to how 'si' and inserting "#" and indent keywords and
...well, whatever other auto-formatting features are in vim.

Is that something that would need to be done on a syntax-by-syntax
file basis?

==OR== is expecting (or wanting) that to be done in syntax
files overloading 'syntax' files -- as they are only designed for
visual syntax hilighting and not modifying vim's input parameters to
be congruent with the visual syntax?
I.e. is a 'input-syntax' file type needed? (I'd sorta hope not,
but I ask) The only reason I ask is based on whether or not it
is common or expected that current syntax files should
adjust vim's other options (I'm guessing not (?)). If it's
not common nor expected, then there's a "whole" people aren't
expecting a 2nd input file to be written or provided to change
input options, BUT, neither is it being provided in the current
syntax file collection (maybe there are exceptions?)

I don't suppose there are any easy ways around problems like this?
I.e. I can set manual options here and there by figure out what the
settings are for my particular circumstance, but that doesn't solve
the general problem (nor do I think I'm sufficiently versed in
the various options to solve such a general problem).

Ideas? Comments? Is this a 'feature deficiency'? :-)
Is it something that is fixable (from a design point of view,
apart from the work needed add the changes for the various
supported syntaxes). Should it be become some future standard
for syntax files to (optionally) set all the input options
associated with a particular syntax?

Am I missing some setting that would just 'do the right thing'? :-)

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

netrc syntax - adding 'account'

Hi.

I have noticed that vim 7.2's syntax file for ~/.netrc does not have support for 'account' keyword (which is probably quite rare but still used for various not-even-related-to-FTP purposes), so I added it myself. It's a very minor change - <http://sprunge.us/VgZX> - but I still would like it to be included with the next version of vim ('account' is defined in manpage of ftp(1)). Being very new to the vim community and everything, I'm asking where should I ask for that.

Thanks for reading.

--
Mantas Mikulėnas, 0xD24F6CB2C1B52632
<http://purl.oclc.org/NET/grawity/>
ASCII ribbon campaign - stop HTML mail

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Darkroom like text placement

Hi Aleksey!

On Do, 31 Dez 2009, Aleksey wrote:

> What I want to achieve is text placement in buffer similar to Darkroom/
> WriteMonkey/Ommwrite/etc
>
> Vim window maximized, buffer text with large fields on left/right,
> auto wrapping to next line without inserting linebreaks.
> Is it possible?

Though, I don't know neither of these editors, I think this topic came
up once on this list and I think I once used a similar solution for
Windows. I don't have it anymore, but the almighty oracle knows about
it:
http://groups.google.com/group/vim_use/msg/1f600508b4fd6b38

regards,
Christian
--
hundred-and-one symptoms of being an internet addict:
43. You tell the kids they can't use the computer because "Daddy's got work to
do" and you don't even have a job.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Split window automatically when opening 2 or 3 files

On Dec 30, 3:37 pm, Brock Henry <brock.he...@gmail.com> wrote:
> Hi,
>
> I want to have Vim (on Windows), automatically split the window if I open
> two files (using right-click explorer integration - Open in Single VIM
> Window).
>
> Actually, a new right-click integration that did this (Open in split VIM
> Window), would be perfect.
>
> Is there anyway to do this?
>

You want to have Windows insert the -o or -O flags to Vim prior to the
file list. You can do this in a few places:

1. You can use a file association so that right-clicking on several
selected files and selecting "Open" will do what you want. This will
also let you double-click to open a single file in a new Vim. See
http://vim.wikia.com/wiki/Windows_file_associations for details.

2. You can use the Windows "Send To" menu to allow you to right-click
on one of the selected files and chose a command from the "Send To"
submenu. See http://vim.wikia.com/wiki/Add_Vim_to_Windows_Send_To_menu
for details.

3. You can find the registry entry that contols the "Edit files in
single Vim" context menu entry and edit that with regedit. I'm not
sure if we have a tip on this, I vaguely remember seeing something to
this effect.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: indentation flex files

On Dec 30, 9:57 pm, David Fishburn <dfishburn....@gmail.com> wrote:
> >> I will an entire suite for Flex develpment. Syntax, indent, compiler,
> >> filetype, documentation.
>
> >> I just haven't posted it anywhere yet.
>
> >> I will try to do that this week and post it to vim.org so people can
> >> try it out and start providing some feedback.
>
> > Have you got it posted somewhere?
>
> Yes, here it is.
> Please post back here on the list with issues, suggestions and so on.
>
> Flex Development Support : Flex development support, ftplugin, indent,
> syntax, code completion, ...http://www.vim.org/scripts/script.php?script_id=2909

I'm not sure if adobe flex is the same as gnu flex (http://
flex.sourceforge.net/) or not?

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: how to highlight the content in the same column

thanks Dominique !
it works


2009/12/31 Dominique Pellé <dominique.pelle@gmail.com>
yorker wrote:

> how to highlight the content in the same column ?
> It is important to write large Python codes  in Vim.
>
> Do any one know how to do that?
>
> just like
> the Demo : http://files.myopera.com/mbbill/files/code_complete.gif
> in http://www.vim.org/scripts/script.php?script_id=1764

:set cuc

You can customize the color of current column with
something like this:

hi CursorColumn guifg=NONE    guibg=#111111 gui=none term=none
cterm=none    ctermfg=NONE ctermbg=grey
hi CursorLine   guifg=NONE    guibg=#111111 gui=none term=none
cterm=none    ctermfg=NONE ctermbg=grey


See also :help cul

Cheers
-- Dominique

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php



--
yorker

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Darkroom like text placement

Aleksey wrote:
> What I want to achieve is text placement in buffer similar to Darkroom/
> WriteMonkey/Ommwrite/etc

Not having used any of these editors, I can only go by your
description and what I've anecdotally heard about it being a
full-screen distraction-removal editor. :)

> Vim window maximized,

Usually this is a function of your window manager, whether the
Windows/Mac/X "Maximize" button, or in some X window-managers
such as Fluxbox (many others do too...I just happen to use flux)
have the ability to map a keys to toggle window chrome and
maximize the window and then remember that at startup of the app.
I usually use (non-g)vim in a chromeless xterm which starts up at
80x25 but I can maximize vertically, horizontally, or both with a
single key-chord.

That said, you can use a combination of :winpos and
'lines'/'columns' to have vim move and resize to right-ish
dimensions in gvim.

:winpos 0 0
:set lines=68 columns=140

> buffer text with large fields on left/right,

On the left, you can either number your lines and set the
number-column width:

:set number numberwidth=8

or you can fudge it using foldcolumns:

:set foldcolumn=8

Right margin is a lot harder to implement without inserting
linebreaks (which you mention you don't want), but if linebreaks
were okay, you could use the 'wrapmargin' setting.

> auto wrapping to next line without inserting linebreaks.

:set wrap wrapmargin=0 textwidth=0 linebreak

> Is it possible?

Mostly? :) You can read more details about them at

:help :winpos
:help 'lines'
:help 'columns'
:help 'number'
:help 'numberwidth'
:help 'foldcolumn'
:help 'wrap'
:help 'wrapmargin'
:help 'textwidth'
:help 'linebreak'

Hope this helps,

-tim


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Darkroom like text placement

What I want to achieve is text placement in buffer similar to Darkroom/
WriteMonkey/Ommwrite/etc

Vim window maximized, buffer text with large fields on left/right,
auto wrapping to next line without inserting linebreaks.
Is it possible?

Thanks

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

unsubscribe

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: how to highlight the content in the same column

yorker wrote:

> how to highlight the content in the same column ?
> It is important to write large Python codes  in Vim.
>
> Do any one know how to do that?
>
> just like
> the Demo : http://files.myopera.com/mbbill/files/code_complete.gif
> in http://www.vim.org/scripts/script.php?script_id=1764

:set cuc

You can customize the color of current column with
something like this:

hi CursorColumn guifg=NONE guibg=#111111 gui=none term=none
cterm=none ctermfg=NONE ctermbg=grey
hi CursorLine guifg=NONE guibg=#111111 gui=none term=none
cterm=none ctermfg=NONE ctermbg=grey


See also :help cul

Cheers
-- Dominique

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

how to highlight the content in the same column

how to highlight the content in the same column ?
It is important to write large Python codes in Vim.

Do any one know how to do that?

just like
the Demo : http://files.myopera.com/mbbill/files/code_complete.gif
in http://www.vim.org/scripts/script.php?script_id=1764

--
yorker

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Wednesday, December 30, 2009

Re: how to open only session files?

I forgot to say I have this set:

" save/restore buffer list
set viminfo+=%

I was hoping the session file would take precedence.

It seems not.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

how to open only session files?

how to open only session files?

I have made a session.vim, when it opens all the previous files I was
working on open, this is good.

1) But if I quit vim,
2) later open a file not in the buffer list
3) quit vim
4) open the session file, some files that are NOT part of the session
will be in the buffer list

How do I keep the session.vim file "clean", that is, when opened only
my working files are in the buffer list.

--
Bill
Santa Cruz, California

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: indentation flex files

>> I will an entire suite for Flex develpment. Syntax, indent, compiler,
>> filetype, documentation.
>>
>> I just haven't posted it anywhere yet.
>>
>> I will try to do that this week and post it to vim.org so people can
>> try it out and start providing some feedback.
>
> Have you got it posted somewhere?


Yes, here it is.
Please post back here on the list with issues, suggestions and so on.

Flex Development Support : Flex development support, ftplugin, indent,
syntax, code completion, ...
http://www.vim.org/scripts/script.php?script_id=2909

Enjoy,
Dave

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: How escape chars in strings in functions

On Wed, 30 Dec 2009 19:14:50 -0600, Stahlman Family wrote:


>
> Nick,
> When using the = register with the :put command, you have to escape both
> | and ". Try the following...
> put='<a href=\"#footnote1\" id=\"back1\">[1]</a>'
>
> :help :put
>
> Hope it helps...
> Brett Stahlman
>

Thanks, that helps a lot. More than maybe you meant since I now realise
':h :put' is different to ':h put'. I can't quite believe I never knew
that. <g>

--
NickC

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: How escape chars in strings in functions

Nick wrote:
> Hi all,
>
> Vim 7.2 on Linux. I'm having problems getting my head around how to
> escape chars in a string used within a function. BTW, I'm a programmer
> and experienced vim user, but new to vim scripting.
>
> I want to insert some html tags at current cursor location, not the next
> line.
>
> String to insert:
> <a href="#footnote1" id="back1">[1]</a>
>
> Based on strings surrounded by '' not being interpreted, as per the help,
> I was going to use:
> put='<a href="#footnote1" id="back1">[1]</a>'
>
> but it bombs out at the '=' after href. The string *is* being interpreted.

Nick,
When using the = register with the :put command, you have to escape both
| and ". Try the following...
put='<a href=\"#footnote1\" id=\"back1\">[1]</a>'

:help :put

Hope it helps...
Brett Stahlman

>
> However, if I use the string in a variable and append it using exe:
> let footnote = '<a href="#footnote1" id="back1">[1]</a>"
> exe "normal a" . footnote
>
> it works fine. Clearly I don't understand when escapes are needed and why
> exe works but put doesn't.
>
> Can anyone point me to where in the manual you can find out about these
> things?
>
> Thanks,

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: How to insert a line without moving the cursor?

On Wed, 30 Dec 2009 14:49:02 -0800, Peng Yu wrote:

> o or O will move the cursor. Is there a command that don't move the
> cursor?

If you don't want to use a function, it's not quite the same position, but
is the same line, plus an alternative for the line below. I use one of
these all the time:
" Add a blank line, position cursor above blank.
map <A-Enter> o<Up><Esc>
" Add a blank line, position cursor below blank.
map <A-Enter> o<Esc>

--
NickC

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: How to insert a line without moving the cursor?

Peng Yu wrote:
> o or O will move the cursor. Is there a command that don't move the
> cursor?

If all you're trying to do is create the line, then perhaps something
like...
:call append(line('.'), '')

:help append()

Brett Stahlman

>

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

How escape chars in strings in functions

Hi all,

Vim 7.2 on Linux. I'm having problems getting my head around how to
escape chars in a string used within a function. BTW, I'm a programmer
and experienced vim user, but new to vim scripting.

I want to insert some html tags at current cursor location, not the next
line.

String to insert:
<a href="#footnote1" id="back1">[1]</a>

Based on strings surrounded by '' not being interpreted, as per the help,
I was going to use:
put='<a href="#footnote1" id="back1">[1]</a>'

but it bombs out at the '=' after href. The string *is* being interpreted.

However, if I use the string in a variable and append it using exe:
let footnote = '<a href="#footnote1" id="back1">[1]</a>"
exe "normal a" . footnote

it works fine. Clearly I don't understand when escapes are needed and why
exe works but put doesn't.

Can anyone point me to where in the manual you can find out about these
things?

Thanks,
--
NickC


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

How to check whether a char is Chinese or not?

To search Chinese within Vim, I can do
/[^\x00-\xff]<CR>

To search non-Chinese within Vim, I can do
/[\x00-\xff]<CR>

Both worked well within Vim buffer, however,
I found it did not work inside a Vim script.

For example:

This function did not work:
---------------------------------------
function! <SID>vimim_ctrl_x_ctrl_u_bs()
---------------------------------------
let char_before = getline(".")[col(".")-2]
if char_before =~ "[\x00-\xff]"
let s:smart_backspace = 1
endif
endfunction

Instead, I have to use an inaccurate alternative:
---------------------------------------
function! <SID>vimim_ctrl_x_ctrl_u_bs()
---------------------------------------
let char_before = getline(".")[col(".")-2]
if char_before =~ '\w'
let s:smart_backspace = 1
endif
endfunction

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

How to insert a line without moving the cursor?

o or O will move the cursor. Is there a command that don't move the
cursor?

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Split window automatically when opening 2 or 3 files

Hi,

I want to have Vim (on Windows), automatically split the window if I open two files (using right-click explorer integration - Open in Single VIM Window).

Actually, a new right-click integration that did this (Open in split VIM Window), would be perfect.

Is there anyway to do this?

Thanks, Brock

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: very simple braces based folding

On Dec 28, 9:58 am, Ben Fritz <fritzophre...@gmail.com> wrote:
> > But still out of luck. With javascript either everything is folded
> > between the first { and the last } (which means the entire file is
> > folded, not each function separately) or no folds are found.
>
> I would read :help java.vim to see if there are any options that might
> affect the folding.

Oops, I somehow got "java" instead of "javascript" out of your email.
Sorry for my careless answer. I'm glat to see Christian was able to
help.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: accelerate seven (or more) substitute

On 30 déc, 13:41, Christian Brabandt <cbli...@256bit.org> wrote:
> Hi epanda!
>
> On Mi, 30 Dez 2009, epanda wrote:
>
> > foo to change to bar
> > oof to change to rab
> > ofo to change to abr
> > fof to change to arb
> > etc...
>
> > all word are different
>
> let subst['foo'] = 'bar'
> let subst['oof'] = 'rab'
> let subst['fof'] = 'arb'
> let subst['ofo'] = 'abr'
> exe ':%s/' . join(keys(subst), '\|'). '/\=subst[submatch(0)]/g'
>
> regards,
> Christian
> --
> hundred-and-one symptoms of being an internet addict:
> 38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail
>     on the way back to bed.


It is ok, just the I flag to put at the end like this exe ':%s/' .
join(keys(subst), '\|'). '/\=subst[submatch(0)]/Ig' in order toavoid
case problem

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Accelerate formatting of 4000 lines into 4000 new

Hi Christian,

I am using one method to take data present in each line of a 4000
lines' file but I would like your advise to accelerate process cause
it takes 10 seconds.

First I am a pattern that recognize some data in each parsed line,
this is it :

let g:patternItemLine = '^.*item foo="\([^"]\+\)\/\(\w\+\)"\s\+foobar
\s*="\([^"]\+\)"\s\+barfoo\s*="\([^"]\+\)"\s\+Type\s*="\([^"]\+\)".*$'

Then I send a g command in order to make the job only on <item lines
in a file that contains other lines'type :
silent g/<item\s/call PROCESS(getline(line('.')))


func! PROCESS(line)

let l:lineArranged = substitute(a:line, g:patternItemLine, '{ "\2",
\3, 0, FALSE, ITEM_\5, OPC_READABLE|OPC_WRITEABLE, \4, USER_FRONTAL|
USER_MAINTENANCE, 0, 0, 0, 0, "\1" },', "")
d)
let g:newContent .= l:lineArranged . "\n"
return ''
endfunc

This call of PROCESS take 10 seconds cause I am analysing the current
line, substituting using 5 backref and concat to a newContent var.

Have you got some idea to accelerate process.
Thank you


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: accelerate seven (or more) substitute

On 30 déc, 13:41, Christian Brabandt <cbli...@256bit.org> wrote:
> Hi epanda!
>
> On Mi, 30 Dez 2009, epanda wrote:
>
> > foo to change to bar
> > oof to change to rab
> > ofo to change to abr
> > fof to change to arb
> > etc...
>
> > all word are different
>
> let subst['foo'] = 'bar'
> let subst['oof'] = 'rab'
> let subst['fof'] = 'arb'
> let subst['ofo'] = 'abr'
> exe ':%s/' . join(keys(subst), '\|'). '/\=subst[submatch(0)]/g'
>
> regards,
> Christian
> --
> hundred-and-one symptoms of being an internet addict:
> 38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail
>     on the way back to bed.

I have to declare subst like that I think : let subst = {}

I think this command is very powerful, I didn't know this combination
of (join and other stuff).

You script says to me that the key OOF does not exist in the
Dictionnary. E476.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

E484 when setting filetype

Whenever I do a set filetype=mason, or it is done from
any file in ~/.vim/ I get an error (translated by me from
Swedish, so the actual English wording may be different):

"Error detected while processing of Syntax Autocommands
E484: can't open file /usr/share/vim/vim71/syntax/mason.vim"

/usr/share/vim/vim71/ doesn't exist anymore on my machine,
but I don't get the error with other filetypes. The error
is not anywhere in ~/.vim/, as far as I can tell.

Doing ln -s /usr/share/vim/vim72/ /usr/share/vim/vim71/
"fixes" the problem, but I guess there is a proper way,
and a real error somewhere with something specifically
naming /usr/share/vim/vim71/ when it shouldn't.
How can I find out?

/BP 8^)>
--
Benct Philip Jonsson -- melroch atte melroch dotte se
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"C'est en vain que nos Josués littéraires crient
à la langue de s'arrêter; les langues ni le soleil
ne s'arrêtent plus. Le jour où elles se *fixent*,
c'est qu'elles meurent." (Victor Hugo)

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: accelerate seven (or more) substitute

Hi epanda!

On Mi, 30 Dez 2009, epanda wrote:

> foo to change to bar
> oof to change to rab
> ofo to change to abr
> fof to change to arb
> etc...
>
> all word are different

let subst['foo'] = 'bar'
let subst['oof'] = 'rab'
let subst['fof'] = 'arb'
let subst['ofo'] = 'abr'
exe ':%s/' . join(keys(subst), '\|'). '/\=subst[submatch(0)]/g'


regards,
Christian
--
hundred-and-one symptoms of being an internet addict:
38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail
on the way back to bed.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: browse in the quickfix window

2009/12/28 Steven Woody <narkewoody@gmail.com>:
> In the quickfix window (opened by :cw), I hit a ENTER on an item and
> the cursor jumps to the main window, this is fine in some cases. But
> what do I do if I want the cursor stay on the quickfix window and just
> like to see the contents of the other window changes?

Maybe something like this?

nnoremap <silent> <C-j> :cnext<CR>
nnoremap <silent> <C-k> :cprevious<CR>

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: accelerate seven (or more) substitute

On 29 déc, 19:09, Tim Chase <v...@tim.thechases.com> wrote:
> > I am doing this job for each line of a 4000 lines files :
>
> >    let l:lineArranged = substitute(l:lineArranged, 'foo1', 'BAR1', "")
> >    let l:lineArranged = substitute(l:lineArranged, 'foo2', 'BAR2', "")
> > ...
> > ..
> >    let l:lineArranged = substitute(l:lineArranged, 'foo7', 'BAR7', "")
>
> Can an item appear more than once (for which you only want to replace
> the first match), or is it okay to use the "g" flag?
>
> If you can do all of them, I'd just use (check for levels of escaping,
> as I'm not sure the "\ze" should be "\\ze"...it's untested, but close
> enough to get you the idea)
>
>    substitute(l:lineArranged, 'foo\ze[1-7]', 'bar', 'g')
>
> I see you're still trying to do this with variables rather than dealing
> with lines in a buffer -- you'll find Vim affords many more conveniences
> for working with lines-in-buffers than it does for manipulating
> variables.  So I'll continue to urge you to consider changing your
> methodology, even if you continue to disregard it :)
>
> -tim

Tim I don't understand your joke sentence cause I am not english.

You missunderstood my pb cause I was not enought accurate in my
description.


It is not foo1, foo2 to foo7 but

foo to change to bar
oof to change to rab
ofo to change to abr
fof to change to arb
etc...

all word are different


About variable or buffer, I don't search for conveniences but for good
response time of my script process.
I believed from a previous post that I had to avoid normal command or
exec 'norm' command and that storing data
into string was more efficient than using visual thing (into a buffer)
like moving or editing commands via normal or exec call

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Tuesday, December 29, 2009

Re: indentation flex files

On Dec 20, 12:25 pm, Vim <dfishburn....@gmail.com> wrote:
> Sorry, can't bottom post.
>
> I will an entire suite forFlexdevelpment. Syntax, indent, compiler,  
> filetype, documentation.
>
> I just haven't posted it anywhere yet.
>
> I will try to do that this week and post it to vim.org so people can  
> try it out and start providing some feedback.

Have you got it posted somewhere?

> > I have the following vim installed, which seems not indentflex
> > (http://flex.sourceforge.net/) files correctly. Are there any files
> > that I should install for vim to indentflexfiles?
>
> > VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Aug 16 2009 01:15:17)
> > MacOS X (unix) version
> > Included patches: 1-245
> > Compiled by Bjorn Winckler <bjorn.winck...@gmail.com>
> > Huge version with MacVim GUI.  Features included (+) or not (-):
> > +arabic +autocmd -balloon_eval +browse ++builtin_terms +byte_offset
> > +cindent
> > +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
> > +comments
> > +cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -
> > ebcdic
> > +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
> > +find_in_path
> > +float +folding -footer +fork() +fullscreen -gettext -hangul_input
> > +iconv
> > +insert_expand +jumplist +keymap +langmap +libcall +linebreak
> > +lispindent
> > +listcmds +localmap +menu +mksession +modify_fname +mouse +mouseshape
> > +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
> > +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg
> > +odbeditor
> > -osfiletype +path_extra -perl +postscript +printer +profile +python
> > +quickfix
> > +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff
> > +statusline
> > -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl
> > +terminfo
> > +termresponse +textobjects +title +toolbar +transparency
> > +user_commands
> > +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
> > +wildignore
> > +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp -
> > xterm_clipboard
> > -xterm_save
> >   system vimrc file: "$VIM/vimrc"
> >     user vimrc file: "$HOME/.vimrc"
> >      user exrc file: "$HOME/.exrc"
> >  system gvimrc file: "$VIM/gvimrc"
> >    user gvimrc file: "$HOME/.gvimrc"
> >    system menu file: "$VIMRUNTIME/menu.vim"
> >  fall-back for $VIM: "/Applications/Vim.app/Contents/Resources/vim"
> > Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -
> > Wall -Wno-unknown-pragmas -pipe -I. -Iproto -DMACOS_X_UNIX -no-cpp-
> > precomp  -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -O -arch i386 -
> > arch ppc       -I/System/Library/Frameworks/Ruby.framework/Versions/
> > 1.8/usr/lib/ruby/1.8/universal-darwin9.0
> > Linking: gcc   -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-
> > syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -o Vim
> > -framework Cocoa -framework Carbon      -lncurses  -liconv    -
> > framework Python  -lruby -lm
>
> > --
> > You received this message from the "vim_use" maillist.
> > For more information, visithttp://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Align plugin - white space separators

On Tue, Dec 29, 2009 at 03:34:15PM EST, Charles Campbell wrote:

[..]

> Again, what does
>
> :verbose map \tsp?
>
> show (that question mark needs to be there)?

v \tsp :<BS><BS><BS><CR>ma'>\tsp
Last set from ~/.vim/plugin/AlignMaps.vim
no \tsp <SNR>11_WS:'a,.s/^\(\s*\)\(.*\)/\=submatch(1).escape(substitute(submatch(2),'\s\+','@','g'),'\')/<CR>:AlignCtrl mI=lp0P0 @<CR>:'a,.Align<CR>:'y+1,'z-1s/@/ /g<CR><SNR>11_WE
Last set from ~/.vim/plugin/AlignMaps.vim

Thanks,

CJ

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Align plugin - white space separators

Sorry about the html, folks -- but to show alignment properly, the email can't be using variable width fonts...

Chris Jones wrote:
------------------------------------------------------------------------
15 hi ErrorMsg ctermfg=9 cterm=none ctermfg=red etc...
16 hi Visual ctermbg=61 cterm=none ctermfg=bg
17            hi VisualNOS           ctermbg=61  cterm=none ctermfg=bg    18 hi Underlined     ctermfg=fg ctermbg=bg  term=underline    -----------------------------------------------------------------------
This is what I got after using \tsp:
   -----------------------------------------------------------------------
15 hi ErrorMsg   ctermfg=9  cterm=none ctermfg=red    etc... 16 hi Visual     ctermbg=61 cterm=none ctermfg=bg 17 hi VisualNOS  ctermbg=61 cterm=none ctermfg=bg 18 hi Underlined ctermfg=fg ctermbg=bg term=underline ------------------------------------------------------------------------  So it looks like it's doing something but it's limited to aligning the each line's leading white space?   

Hardly.  The fields, as shown above, are aligned with spaces appropriately intercalated.  Initial whitespace is another issue; there are three options for dealing with it (see :help alignctrl-w, alignctrl-W, and alignctrl-I).
 Or am I misunderstanding what the plugin does or can do when the separator is white space?   

I suspect that you have some option set that I don't (or possibly vice versa) that's interfering.  Perhaps you could try having the following in a file called "simple.vimrc":

set nocp
syn on
filetype plugin on

and using   vim -u simple.vimrc yourtestfile

and \tsp with it.  This will still load all your current plugins, one of which may somehow be interfering with Align.


 Yes, but I'm not using any kind of selection - I'm using the syntax as defined in the help file:  :[range]Align \tsp :[range]Align \Tsp :[Range]Align \tsq ... etc.  [..]   

From an earlier note you'd said that you selected lines using ctrl-v.  That's visual block selection; the alignmaps will treat that the same as "V" (visual line selection).  It results in a range of lines.
   
So to determine why the alignmaps aren't working will take some investigation (are plugin/AlignMapsPlugin.vim, autoload/AlignMaps.vim, etc in the proper places, what is the result of   :verbose map \tsp? etc), or perhaps you could simply get the latest version      
   
(http://mysite.verizon.net/astronaut/vim/index.html#ALIGN)      
   
and install it:    vim align.vba.gz   :so %   :q     
 Had done that just in case, but it gets me a screenful of messages where all the <leader>xx's installed by the plugin are already mapped. I had removed the 'lenny' version, and started a fresh instance of Vim, so I don't know.   

Something in your setup is definitely odd.  All of the vim script portions of the various Align files are protected against double-loading; ie. for autoload/Align.vim, at the beginning is:

if exists("g:loaded_Align") || &cp
 finish
endif

This snippet essentially says that "if the autoload/Align.vim has already been loaded, don't load it again".  Your home directory is normally loaded first, so it should have prevented the systemwide lenny version from interfering.
 Anyway the version from your web site does exactly the same, just removes leading blanks on every line that happens to have them.   The more I think about it, it's probably me misunderstanding what the plugin should be doing when spaces are used as separators.   
Again, what does

  :verbose map \tsp?

show (that question mark needs to be there)? 

Regards,
Chip Campbell

Re: Align plugin - white space separators

On Mon, Dec 28, 2009 at 10:35:01AM EST, Charles Campbell wrote:
> Chris Jones wrote:

[..]

> > I selected the text via a Ctrl-V and issued a: ":Align \tsp" and
> > nothing happened.

------------------------------------------------------------------------
15 hi ErrorMsg ctermfg=9 cterm=none ctermfg=red etc...
16 hi Visual ctermbg=61 cterm=none ctermfg=bg
17 hi VisualNOS ctermbg=61 cterm=none ctermfg=bg
18 hi Underlined ctermfg=fg ctermbg=bg term=underline
------------------------------------------------------------------------

Actually, when I indent a few lines such as l. 15 and l. 17 above, the
plugin realigns them, so to speak.

------------------------------------------------------------------------
15 hi ErrorMsg ctermfg=9 cterm=none ctermfg=red etc...
16 hi Visual ctermbg=61 cterm=none ctermfg=bg
17 hi VisualNOS ctermbg=61 cterm=none ctermfg=bg
18 hi Underlined ctermfg=fg ctermbg=bg term=underline
------------------------------------------------------------------------

So it looks like it's doing something but it's limited to aligning the
each line's leading white space?

Or am I misunderstanding what the plugin does or can do when the
separator is white space?

If you take line 15 above for instance, there are seven spaces after
ErrorMSg, while line 16 has fourteen between Visual and ctermbg=61.

What's the plugin supposed to do?

The right thing to do as I see it would be to collapse all contiguous
spaces so that there is only one space separating fields, and then
expand them so that field1, field2, field3, etc. on each line starts in
the same column.

But then that's because that's what _I_ want the plugin to do for me in
this particular case.. :-)

> That's odd -- because it works for me, with your example as given
> below.

Never underestimate the creative powers of the User.

> Now, although the Align command itself works with visually selected
> blocks, the maps don't work with ctrl-v selected blocks (ie. such
> visual blocks are treated as visually selected line ranges, like "V").
> One way to get the maps to work with visual blocks is with vis.vim;
> you can get vis.vim from:

> http://vim.sourceforge.net/scripts/script.php?script_id=1195 (stable)
> http://mysite.verizon.net/astronaut/vim/index.html#VIS (cutting edge)

> With it, use ctrl-v to select the visual block and then :B \tsp (for
> example).

Yes, but I'm not using any kind of selection - I'm using the syntax as
defined in the help file:

:[range]Align \tsp
:[range]Align \Tsp
:[Range]Align \tsq ... etc.

[..]

> So to determine why the alignmaps aren't working will take some
> investigation (are plugin/AlignMapsPlugin.vim, autoload/AlignMaps.vim,
> etc in the proper places, what is the result of :verbose map \tsp?
> etc), or perhaps you could simply get the latest version

> (http://mysite.verizon.net/astronaut/vim/index.html#ALIGN)

> and install it:
>
> vim align.vba.gz
> :so %
> :q

Had done that just in case, but it gets me a screenful of messages where
all the <leader>xx's installed by the plugin are already mapped. I had
removed the 'lenny' version, and started a fresh instance of Vim, so I
don't know.

Anyway the version from your web site does exactly the same, just
removes leading blanks on every line that happens to have them.

The more I think about it, it's probably me misunderstanding what the
plugin should be doing when spaces are used as separators.

Thanks,

CJ

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: accelerate seven (or more) substitute

> I am doing this job for each line of a 4000 lines files :
>
> let l:lineArranged = substitute(l:lineArranged, 'foo1', 'BAR1', "")
> let l:lineArranged = substitute(l:lineArranged, 'foo2', 'BAR2', "")
> ...
> ..
> let l:lineArranged = substitute(l:lineArranged, 'foo7', 'BAR7', "")

Can an item appear more than once (for which you only want to replace
the first match), or is it okay to use the "g" flag?

If you can do all of them, I'd just use (check for levels of escaping,
as I'm not sure the "\ze" should be "\\ze"...it's untested, but close
enough to get you the idea)

substitute(l:lineArranged, 'foo\ze[1-7]', 'bar', 'g')

I see you're still trying to do this with variables rather than dealing
with lines in a buffer -- you'll find Vim affords many more conveniences
for working with lines-in-buffers than it does for manipulating
variables. So I'll continue to urge you to consider changing your
methodology, even if you continue to disregard it :)

-tim

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: vim -c

On 29 déc, 17:42, Gary Johnson <garyj...@spocom.com> wrote:
> On 2009-12-29, epanda wrote:
> > Hi,
>
> > I am launching several script like that :
>
> > vim -c "call funcScript()" -c "call func2Script()" -c "qa!"
>
> > I have the message --Plus-- when screen is full and there are some
> > others things to display.
>
> > How can I force the vim -c execution to display without confirm --
> > Plus-- message and avoid typing in order to have a selfrun?
>
> Try adding
>
>     -c "set nomore"
>
> before any of the other -c arguments.
>
> Regards,
> Gary

Thank you Gary!

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

accelerate seven (or more) substitute

Hi,

I am doing this job for each line of a 4000 lines files :

let l:lineArranged = substitute(l:lineArranged, 'foo1', 'BAR1', "")
let l:lineArranged = substitute(l:lineArranged, 'foo2', 'BAR2', "")

...
..
let l:lineArranged = substitute(l:lineArranged, 'foo7', 'BAR7', "")


I would like to accelerate the job.
How can I do ?

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: filelist window ?

> you mentioned something about big files and having to write
> manifest/files file - can you please explain what you mean ?

If you use git, tselectfiles can get the list of files from there by
setting b:trag_git to the absolute path to the git repos.
Alternatively, you can use a manifest file (set b:trag_project to the
full pathname thereof) which you can create with (this is gnu
findutils' find)

find DIRS -name "*.xx" > manifest.txt

or

find DIRS | grep -e "\.\(ext1\|ext2\|ext3\)$$" > manifest.txt

or something similar. I usually have such a goal in my makefile.

The aforementioned project plugin is a popular alternative but AFAIK
it is unmaintained and (in my experience) buggy.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: vim -c

On 2009-12-29, epanda wrote:
> Hi,
>
>
> I am launching several script like that :
>
>
> vim -c "call funcScript()" -c "call func2Script()" -c "qa!"
>
> I have the message --Plus-- when screen is full and there are some
> others things to display.
>
> How can I force the vim -c execution to display without confirm --
> Plus-- message and avoid typing in order to have a selfrun?

Try adding

-c "set nomore"

before any of the other -c arguments.

Regards,
Gary


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: confirm func

On 29 déc, 15:36, Matt Wozniski <m...@drexel.edu> wrote:
> On Tue, Dec 29, 2009 at 7:53 AM, epanda wrote:
> > Hi,
>
> > Is it possible to use confirm to display a message for color but
> > without confirmation of user ?
>
> I'm not completely sure I understand what you're asking, but maybe
> you're looking for :echohl ?
>
> ~Matt

this is it !
Thank you

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

vim -c

Hi,


I am launching several script like that :


vim -c "call funcScript()" -c "call func2Script()" -c "qa!"

I have the message --Plus-- when screen is full and there are some
others things to display.

How can I force the vim -c execution to display without confirm --
Plus-- message and avoid typing in order to have a selfrun?

Thanks

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: filelist window ?

mar, 29 Dec 2009, Ramagudi Naziir skribis:
> Thanks Tom and Joan.
>
> I'll check out tselectfiles (any particular other plugin you recommend
> me to check in that respect?).
>
> The reason I can't use stuff like :tabedit is that I handle huge
> project with thousands of files. It can take me minutes to find a
> specific file in such a huge hierarchy, so I must have 1 place that is
> familiar with all files in the project, and which allow me to easily
> search for patterns in file names.
>
> Tom, you mentioned something about big files and having to write
> manifest/files file - can you please explain what you mean ?
>
> Thank you a lot

you may have look at the project plugin that I used to manage over 1000
files. There is a very short introduction at

http://ariya.blogspot.com/2008/07/vim-lightning-fast-navigation-in-large.html

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: confirm func

On Tue, Dec 29, 2009 at 7:53 AM, epanda wrote:
> Hi,
>
>
> Is it possible to use confirm to display a message for color but
> without confirmation of user ?

I'm not completely sure I understand what you're asking, but maybe
you're looking for :echohl ?

~Matt

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: filelist window ?

Thanks Tom and Joan.

I'll check out tselectfiles (any particular other plugin you recommend
me to check in that respect?).

The reason I can't use stuff like :tabedit is that I handle huge
project with thousands of files. It can take me minutes to find a
specific file in such a huge hierarchy, so I must have 1 place that is
familiar with all files in the project, and which allow me to easily
search for patterns in file names.

Tom, you mentioned something about big files and having to write
manifest/files file - can you please explain what you mean ?

Thank you a lot

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: very simple braces based folding

On 12/29/09, Christian Brabandt <cblists@256bit.org> wrote:
> Hi Daniel!
>
> On So, 27 Dez 2009, Daniel Fetchinson wrote:
>
>> void x( )
>> -----------------folded--------------
>> void y( )
>> -----------------folded--------------
>>
>> And if the folded regions are unfolded, there are no enclosed folds
>> either (only top level braces are folded).
>>
>> This is all good.
>>
>> Now I have a hard time reproducing all of this with javascript files :(
>
> If I read syntax/javascript.vim correctly you need to enable syntax
> based folding by setting :let javaScript_fold=1 in e.g. your .vimrc.
>
> However there seems to be a bug with syntax based folding, which
> prevents folding. The following patch works for me (I understand syntax
> rules only very basically), therefore cc'ing the maintainer Claudio
> Fleiner.
>
> chrisbra@256bit:~/local/share/vim/vim72/syntax$ diff -Nu
> javascript.vim{.orig,}
> --- javascript.vim.orig 2009-12-29 14:12:39.000000000 +0100
> +++ javascript.vim 2009-12-29 14:12:42.000000000 +0100
> @@ -47,7 +47,7 @@
> syn keyword javaScriptRepeat while for do in
> syn keyword javaScriptBranch break continue
> syn keyword javaScriptOperator new delete instanceof typeof
> -syn keyword javaScriptType Array Boolean Date Function Number
> Object String RegExp
> +syn keyword javaScriptType Array Boolean Date Number Object
> String RegExp
> syn keyword javaScriptStatement return with
> syn keyword javaScriptBoolean true false
> syn keyword javaScriptNull null undefined
>
> The problem seems to be that the syntax keywod javaScriptType
> takes precedence over the defined region javaScriptFunction and
> therefore prevents that the syntax folding applies. Claudio probably
> knows better if this is true and how to fix the problem.
>
> regards,
> Christian

Thanks Christian!

Your patch does indeed fix the problem!

Cheers,
Daniel


--
Psss, psss, put it down! - http://www.cafepress.com/putitdown

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: very simple braces based folding

Hi Daniel!

On So, 27 Dez 2009, Daniel Fetchinson wrote:

> void x( )
> -----------------folded--------------
> void y( )
> -----------------folded--------------
>
> And if the folded regions are unfolded, there are no enclosed folds
> either (only top level braces are folded).
>
> This is all good.
>
> Now I have a hard time reproducing all of this with javascript files :(

If I read syntax/javascript.vim correctly you need to enable syntax
based folding by setting :let javaScript_fold=1 in e.g. your .vimrc.

However there seems to be a bug with syntax based folding, which
prevents folding. The following patch works for me (I understand syntax
rules only very basically), therefore cc'ing the maintainer Claudio
Fleiner.

chrisbra@256bit:~/local/share/vim/vim72/syntax$ diff -Nu javascript.vim{.orig,}
--- javascript.vim.orig 2009-12-29 14:12:39.000000000 +0100
+++ javascript.vim 2009-12-29 14:12:42.000000000 +0100
@@ -47,7 +47,7 @@
syn keyword javaScriptRepeat while for do in
syn keyword javaScriptBranch break continue
syn keyword javaScriptOperator new delete instanceof typeof
-syn keyword javaScriptType Array Boolean Date Function Number Object String RegExp
+syn keyword javaScriptType Array Boolean Date Number Object String RegExp
syn keyword javaScriptStatement return with
syn keyword javaScriptBoolean true false
syn keyword javaScriptNull null undefined

The problem seems to be that the syntax keywod javaScriptType
takes precedence over the defined region javaScriptFunction and
therefore prevents that the syntax folding applies. Claudio probably
knows better if this is true and how to fix the problem.

regards,
Christian
--
hundred-and-one symptoms of being an internet addict:
36. You miss more than five meals a week downloading the latest games from
Apogee.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

confirm func

Hi,


Is it possible to use confirm to display a message for color but
without confirmation of user ?

Thanks

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: filelist window ?



2009/12/29 Ramagudi Naziir <naziirr@gmail.com>
Hi!

I really really want something like taglist but for files:
A window that will show me the list of files in my project,
in which i can easily find my files.
E.g., a user can type the name or part of the file name he is looking
for,
the the list of file names will be narrowed down and he could just
choose his file to open easily.

the file list should have all the files in the project (recursively
looking for files in subdirectories).

any idea how I can acheive this ?

 Like Tom says, there are several plugins that achieve this, but I hate wasting as much screen space.

Instead of that, when I need to pick for some file, I simply execute ":tabedit ." (note the final dot) which opens current directory in new tab.

Of course, I like working with tabs. If you prefer to open it in new window, then you can simply make :Sex (again, NOTE the colon ;-))

Cheers.

--
Joan Miquel Torres__________________________________
Linux Registered User #164872
http://www.mallorcaweb.net/joanmiquel
BULMA: http://bulma.net http://breu.bulma.net/?l2301

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Monday, December 28, 2009

Re: filelist window ?

> E.g., a user can type the name or part of the file name he is looking
> for,
> the the list of file names will be narrowed down and he could just
> choose his file to open easily.

There are several plugins that achieve this -- tselectfiles being one
of them: http://www.vim.org/scripts/script.php?script_id=1865

For bigger files you might want to generate a manifest/files file. You
could then use vim's own gf to jump to that file.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

filelist window ?

Hi!

I really really want something like taglist but for files:
A window that will show me the list of files in my project,
in which i can easily find my files.
E.g., a user can type the name or part of the file name he is looking
for,
the the list of file names will be narrowed down and he could just
choose his file to open easily.

the file list should have all the files in the project (recursively
looking for files in subdirectories).

any idea how I can acheive this ?

it's very comfortable for big projects..
(e.g. source insight has this window on the right)

thanks!
naziir

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Stop recording in insert mode

On 12/28/2009 02:15 PM, Chris McDonald wrote:
> It wont put you in insert mode when you re-run the macro, but you can
> use ^O q to leave recording mode and stay in insert mode.

Fascinating -- I thought about this and figured it would include the ^O
in the macro itself like the <esc> does Apparently, from a quick test,
it doesn't.

-tim

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Stop recording in insert mode

It wont put you in insert mode when you re-run the macro, but you can
use ^O q to leave recording mode and stay in insert mode.

On Mon, Dec 28, 2009 at 12:20:03PM -0300, Mario Martínez wrote:
> Hi,
>
> I would like to record some typed characters and then keep vim in
> insert mode instead of normal mode. That is when you press q to stop
> the recording.
>
> Do you know any way to do that?
>
> Thanks in advance,
>
> Mario.
>
> --
> You received this message from the "vim_use" maillist.
> For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Stop recording in insert mode

> I would like to record some typed characters and then keep vim in
> insert mode instead of normal mode. That is when you press q to stop
> the recording.

I don't think there's a native way to do it, but you can post-process
the register into which you recorded it to remove the last item (the
<esc>), something like this (untested)

[record macro into "a", go into insert mode, do stuff, press <esc>
and press "q" to stop recording]
:let @a=@a[:-2]

which should snip off the terminal <esc> from the macro stored in @a

-tim


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: start search at current line, wrap around?

Matt Wozniski wrote:
> You could make the "implementation" mapping be defined for visual
> mode, then map normal-mode <F5> to V<F5> and insert mode <F5> to
> <C-o>V<F5>, or something like that, but then using <F5> in normal or
> insert mode would clobber the '< and '> marks. You could split out
> the important part of the implementation into a cmap, and have normal,
> insert, and visual all be mapped to something that gets into
> command-line mode with the correct leading range, and then invokes
> that cmap, but that's almost certainly more trouble than it's worth.
> It's probably best to just define the map multiple times.

Thank you Matt

I tried:

vmap <silent> <F5> :s/^/\\ /e<cr>
nmap <F5> V<F5>
imap <F5> <c-o><F5>

It works great.
It does not matter that the '< and '> marks are clobbered.

-Bill

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: this nmap and imap work, but the vmap does not

On Mon, Dec 28, 2009 at 11:01 AM, Ben Fritz wrote:
>
> On Dec 27, 9:46 am, Bee wrote:
>> Adding <esc> did allow it to work, but only on the last line of the
>> selection.
>>
>> How can the selection be passed on?
>
> Oops, I neglected that part.
>
> Your explicit visual-mode mapping works on every line because pressing
> ':' in visual mode automatically enters a range of '<,'> to your Ex
> command, which means to run the Ex command on the visual selection. I
> do not think you will be able to use <F5> in your mapping after all,
> without some logic to determine what mode you are in, in which case it
> would just be easier to explicitly specify the command in a visual-
> mode mapping.

You could make the "implementation" mapping be defined for visual
mode, then map normal-mode <F5> to V<F5> and insert mode <F5> to
<C-o>V<F5>, or something like that, but then using <F5> in normal or
insert mode would clobber the '< and '> marks. You could split out
the important part of the implementation into a cmap, and have normal,
insert, and visual all be mapped to something that gets into
command-line mode with the correct leading range, and then invokes
that cmap, but that's almost certainly more trouble than it's worth.
It's probably best to just define the map multiple times.

~Matt

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: when to use or in mappings

On Mon, Dec 28, 2009 at 9:01 AM, Tim Chase wrote:
>> <Esc>  or CTRL-[ End insert or Replace mode, go back to Normal mode.
>>                  Finish abbreviation.
>>
>> CTRL-C Quit insert mode, go back to Normal mode.
>>         Do not check for abbreviations.
>>         Does not trigger the |InsertLeave| autocommand event.
>>
>> In mappings I have seen both used.
>>
>> Please elaborate the fine points of use.
>
> Well, the help summarizes the differences fairly succinctly:  do you
> want abbreviations to be expanded or not?  Do you want the InsertLeave
> autocommand event to trigger.  According to the help, it looks like
> abbreviations can get expanded in mappings[1] but I didn't get them to
> trigger in my testing:
>
>   :iab x hello
>   :nnoremap Q oa x b<esc>
>
> and then using Q to insert the text, I just get a line with "a x b"
> instead of "a hello b".

Try using :nmap instead of :nnoremap.

:iab x hello
:nmap W oa x b<esc>

I don't know if this is explicitly documented anywhere, but it makes
sense when you think about it: if the purpose of noremap'ing is to
make sure that your map always behaves the same way, it makes sense
that it would disable both maps and abbreviations.

~Matt

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: this nmap and imap work, but the vmap does not

On Dec 27, 9:46 am, Bee <200...@calcentral.com> wrote:
> Adding <esc> did allow it to work, but only on the last line of the
> selection.
>
> How can the selection be passed on?

Oops, I neglected that part.

Your explicit visual-mode mapping works on every line because pressing
':' in visual mode automatically enters a range of '<,'> to your Ex
command, which means to run the Ex command on the visual selection. I
do not think you will be able to use <F5> in your mapping after all,
without some logic to determine what mode you are in, in which case it
would just be easier to explicitly specify the command in a visual-
mode mapping.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: very simple braces based folding

On Dec 28, 8:33 am, Daniel Fetchinson <fetchin...@googlemail.com>
wrote:
>
> But still out of luck. With javascript either everything is folded
> between the first { and the last } (which means the entire file is
> folded, not each function separately) or no folds are found.
>

I would read :help java.vim to see if there are any options that might
affect the folding. However, a quick look at the syntax file shows a
highlight group that does not "contain" and is not "containedin"
anything, nor do any other syntax groups contain it. This is somewhat
suspicious to me. I don't code in Java, so I have no idea whether
folding works in general, but I know it is a relatively recent
introduction to the syntax file because we have a few tips on the wiki
about adding folding to java syntax. If you do not receive any
responses back, try contacting the maintainer listed on $VIMRUNTIME/
syntax/java.vim header comment.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: vimrc ignores formatoptions

On Dec 27, 9:33 pm, James Michael Fultz <croo...@gmail.com> wrote:
>
> setlocal fo-=cr

The rest of your response was valid, but it is NOT a good idea to do a
set-= with multiple letters, because if you do, it will only work if
the letters appear together exactly as you have them. For example, the
command given above will work on the formatoptions string 'tcrq' but
not on the option string 'tcorql', on which it will do nothing.
Instead do each letter separately, like "setlocal fo-=c fo-=r"

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: start search at current line, wrap around?

On Sun, Dec 27, 2009 at 10:14 PM, Tim Chase wrote:
> You can also use "*" as the range:
>
>    :*s/foo/bar/g
>
> assuming you have the default 'cpoptions' set:

Wow, I never noticed that particular cpoption. That will come in
quite handy to me, thanks!

~Matt

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Align plugin - white space separators

Chris Jones wrote:
> On Sat, Dec 26, 2009 at 11:20:09PM EST, Charles E Campbell Jr wrote:
>
>> Chris Jones wrote:
>>
>>> Prettifying a color scheme, which looks like so:
>>>
>>> ------------------------------------------------------------------------
>>> 15 hi ErrorMsg ctermfg=9 cterm=none ctermfg=red etc...
>>> 16 hi Visual ctermbg=61 cterm=none ctermfg=bg
>>> 17 hi VisualNOS ctermbg=61 cterm=none ctermfg=bg
>>> 18 hi Underlined ctermfg=fg ctermbg=bg term=underline
>>> ------------------------------------------------------------------------
>>>
>>> I wanted to end up with this:
>>>
>>> ------------------------------------------------------------------------
>>> 15 hi ErrorMsg ctermfg=9 cterm=none ctermfg=red
>>> 16 hi Visual ctermbg=61 cterm=none ctermfg=bg
>>> 17 hi VisualNOS ctermbg=61 cterm=none ctermfg=bg
>>> 18 hi Underlined ctermfg=fg ctermbg=bg term=underline
>>> ------------------------------------------------------------------------
>>>
>>> I gave the Align plugin a shot and eventually did the following:
>>>
>>> 15,18s/\ \ \+/@/g
>>> 15,18s/\ /@/g
>>> 15,18Align @
>>> 15,18s/@/\ /g
>>>
>>> Is there a more 'standard' way to do this?
>>>
>>>
>> :help alignmap-tsp
>>
>> might help.
>>
>
> I had already read this, and experimented with it.
>
> I selected the text via a Ctrl-V and issued a: ":Align \tsp" and nothing
> happened.
>

That's odd -- because it works for me, with your example as given
below. Now, although the Align command itself works with visually
selected blocks, the maps don't work with ctrl-v selected blocks (ie.
such visual blocks are treated as visually selected line ranges, like
"V"). One way to get the maps to work with visual blocks is with
vis.vim; you can get vis.vim from:

http://vim.sourceforge.net/scripts/script.php?script_id=1195 (stable)
http://mysite.verizon.net/astronaut/vim/index.html#VIS
(cutting edge)

With it, use ctrl-v to select the visual block and then :B \tsp (for
example).

> Since I had tried many other things to get the plugin to align on white
> spaces before I found alignmap-tsp, I did it again just to make sure and
> saw the same result: the buffer is not modified.
>
> I read (again) the intro at :h align-maps, sourced AlignMaps.vim to be
> on the safe side, repeated the experience a couple of times, once with a
> different test file containing:
>
> ------------------------------------------------------------------------
> a b c d
> a b c d
> a b c d
> ------------------------------------------------------------------------
>
> .. and still nothing happens.
>
> I'm running Vim 7.1 on a debian lenny system and the plugin was
> installed like so:
>
> # vim-addons -v -w install align
>
> In other words, it's the version of the plugin that ships with Vim,
> installed by root, system-wide.
>
>
Well, align/alignmaps doesn't come with vim, although it appears that
debian lenny adds it in on their own. That install procedure is also
not the standard way to install align/alignmaps, its a debian-lenny
"thing", and so I'm not familiar with it (I use fedora, myself). So to
determine why the alignmaps aren't working will take some investigation
(are plugin/AlignMapsPlugin.vim, autoload/AlignMaps.vim, etc in the
proper places, what is the result of :verbose map \tsp? etc), or
perhaps you could simply get the latest version
(http://mysite.verizon.net/astronaut/vim/index.html#ALIGN) and install it:

vim align.vba.gz
:so %
:q

Regards,
Chip Campbell


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Stop recording in insert mode

Hi,

I would like to record some typed characters and then keep vim in
insert mode instead of normal mode. That is when you press q to stop
the recording.

Do you know any way to do that?

Thanks in advance,

Mario.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: very simple braces based folding

> Hi folks,
>
> I use a pretty simple folding algorithm for C files and it works very well:
>
> " This is in my .vimrc
> set foldnestmax=1
>
> " And these are in .vim/ftplugin/c.vim
> syn sync fromstart
> set foldmethod=syntax
>
> I guess the default settings for C files are also loaded from
> /usr/share/vim/vim72/syntax/c.vim etc.
>
> The above settings do exactly what I need, folding only top level
> braces, i.e. if I have
>
> void x( )
> {
> something
> {
> .................
> }
> }
> void y( )
> {
> etc
> {
> .........
> }
> somemorestuff
> {
> ...........
> }
> }
>
> then folding everything produces
>
> void x( )
> -----------------folded--------------
> void y( )
> -----------------folded--------------
>
> And if the folded regions are unfolded, there are no enclosed folds
> either (only top level braces are folded).
>
> This is all good.
>
> Now I have a hard time reproducing all of this with javascript files :(
>
> If I copy the same settings from ~/.vim/ftplugin/c.vim to
> ~/.vim/ftplugin/javascript.vim I don't get the same results, for
> example vim can't find folds where there should be one, for example
> between two top level braces.
>
> I guess the different behavior has to do with the fact that although
> my custom settings are the same, the system wide
> /usr/share/vim/vim72/syntax/* settings are not the same for javascript
> and C.
>
> I tried solving the problem by :set filetype=c for javascript, which
> indeed does the folding as I expect it, but it comes with all sorts of
> other problems due to the source file not being C but javascript (for
> example something({ ........ }) which is common in javascript
> highlights the braces in red, indicating an error, since this
> construct is indeed erroneous in C).
>
> So my question is: how would I make vim fold only top level braces
> once for javascript files?

By the way, I did read

:help :syn-end
:help :syn-contains
:help :syn-contained
:help :syn-keepend

But still out of luck. With javascript either everything is folded
between the first { and the last } (which means the entire file is
folded, not each function separately) or no folds are found.

Cheers,
Daniel

--
Psss, psss, put it down! - http://www.cafepress.com/putitdown

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: when to use or in mappings

> <Esc> or CTRL-[ End insert or Replace mode, go back to Normal mode.
> Finish abbreviation.
>
> CTRL-C Quit insert mode, go back to Normal mode.
> Do not check for abbreviations.
> Does not trigger the |InsertLeave| autocommand event.
>
> In mappings I have seen both used.
>
> Please elaborate the fine points of use.

Well, the help summarizes the differences fairly succinctly: do you
want abbreviations to be expanded or not? Do you want the InsertLeave
autocommand event to trigger. According to the help, it looks like
abbreviations can get expanded in mappings[1] but I didn't get them to
trigger in my testing:

:iab x hello
:nnoremap Q oa x b<esc>

and then using Q to insert the text, I just get a line with "a x b"
instead of "a hello b".

-tim

[1]
Abbreviations are never recursive. You can use
":ab f f-o-o" without any problem. But
abbreviations can be mapped.
-just above :help :abbreviate-local


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: start search at current line, wrap around?

On 12/27/2009 10:18 PM, Bee wrote:
> Tim Chase wrote:
>> assuming you have the default 'cpoptions' set:
>>
>> :help cpo-star
>>
>> It's the only place in the help I've seen it documented,
>> but I use it enough that others might find it handy.
>
> Thank you, another VERY useful tip.
> It also got me reading about ":'<,'>"
> ( ":*" is an alias for ":'<,'>" )
>
> :help v_:
>
> {Visual}: Starts a command-line with the Visual selected lines
> as a range. The code ":'<,'>" is used for this range, which
> makes it possible to select a similar line from the command-line
> history for repeating a command on different Visually selected
> lines.
>
> This means I can Visually select a range,
> do a search and replace,
> then Visually select a different range,
> even a different size range,
> recall any previous search/replace
> and it will work on the completely new range.

If you just want to execute the most recent Ex command (such as your :s
command), it's available as a register/macro, so you can re-execute it with

@:

and subsequent re-executions (which I often end up doing) can be rerun with

@@

(which is faster/easier to type, IMHO)

:help @:
:help @@

If you need to dig further back in your command-line history, it's just
a ^P away, or you can hit ^F (by default, though overrideable) from the
command-line, or in normal-mode use

q:

to bring up the command-line editing window.

:help c_ctrl-p
:help c_ctrl-n
:help cmdwin

Hope this helps you hack some more.

-tim

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

browse in the quickfix window

Hi,

In the quickfix window (opened by :cw), I hit a ENTER on an item and
the cursor jumps to the main window, this is fine in some cases. But
what do I do if I want the cursor stay on the quickfix window and just
like to see the contents of the other window changes?

Thanks.

--
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer

narke
public key at http://subkeys.pgp.net:11371 (narkewoody@gmail.com)

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Concatenate each items of two Lists

let globalList = map(list1, 'v:val . list2[v:count]')


I am not too sure, why are you using v:count. I don't think it is applicable.
see :h v:count

 

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Python: module-aware jumping to class definition - possible?

On 24 Gru, 08:44, Piotr Czachur <zim...@gmail.com> wrote:
> Hi!
>
> Lets assume I got InterestingClass definitions in variouspython
> modules.
> I've set proper PYTHONPATH for VIM.
>
> I'm heavy wondering whether it is possible to jump from:
> ### my/package/one.py
> from my.other_package.two import utils
> class Foo(utils.InterestingClass): ## HERE, cursor placed on
> "InterestingClass"
>     pass
> ###
> ...directly to InterestingClass definition in my/other_package/two/
> utils.py?
>
Ropevim plugin and command :RopeGoToDefinition should be enough.
http://rope.sourceforge.net/ropevim.html

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php