John Beckett | 1 Mar 2010 01:25
Picon

RE: Smart expandtab at beginning of line vs in mid-line?

Michael Ludwig wrote:
> For indenting at the beginning of the line, I want tabs.
> But in mid-line, I want them to be expanded to spaces.

The first has general principles; the second is on your point:
http://vim.wikia.com/wiki/Indenting_source_code
http://vim.wikia.com/wiki/Indent_with_tabs,_align_with_spaces

John

--

-- 
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

John Beckett | 1 Mar 2010 01:27
Picon

RE: vi, search string and comment line howto?

omonte7 wrote:
> Subject: vi, search string and comment line howto?

The answers to your previous post are here:
http://groups.google.com/group/vim_use/browse_thread/thread/3ff28355fd3416fa

John

--

-- 
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

Michael Ludwig | 1 Mar 2010 03:49
Gravatar

Re: Smart expandtab at beginning of line vs in mid-line?

John Beckett schrieb am 01.03.2010 um 11:25:35 (+1100):
> Michael Ludwig wrote:
> > For indenting at the beginning of the line, I want tabs.
> > But in mid-line, I want them to be expanded to spaces.
> 
> The first has general principles; the second is on your point:
> http://vim.wikia.com/wiki/Indenting_source_code
> http://vim.wikia.com/wiki/Indent_with_tabs,_align_with_spaces

Thanks! I had read the first but not the second. Excellent
documentation!

Smart Tabs (ctab.vim) 1.4.1 does exactly what I want.

The newer version 2.1, however, seems to be less robust. I got
the following error messages right after hitting "o" to insert
lines:

=<SNR>12_CheckAlign(line('.'))."\<END>"
Error detected while processing function <SNR>12_CheckAlign:
line   25:
E121: Undefined variable: inda
Press ENTER or type command to continue
Error detected while processing function <SNR>12_CheckAlign:
line   25:
E15: Invalid expression: inda / 50
Press ENTER or type command to continue
Error detected while processing function <SNR>12_CheckAlign:
line   26:
E121: Undefined variable: inda
(Continue reading)

pansz | 1 Mar 2010 04:51

Re: FedoraCore 8


>   1) Build of sources might not work since the installation might
>      not have some "developer" packages needed for the build
>      process.  One would think that an installation of Fedora would
>      have "everything" whereas an installation of "RedHat" might
>      miss some developer packages but I found a Fedora 8 install
>      that did not have things needed to build vim!

This is true for all mainstream Linux distributions: you may need 50G 
disk spaces to install all developer packages or some 100G to install 
"everything".

Believe me, you won't want to install everything and you don't even want 
to download everything.

>   4) On Fedora, one can use the "yum" command;  for example, on
>      Fedora 8, "yum install vim-enhanced" will install vim 7.1 with
>      patches 1-242.  Note that the rpm listed in the link at (2),
>      viz., vim-enhanced-7.1.135-1.fc8.i386.rpm, has only 135 patches
>      but yum was able to install vim-enhanced with 242 patches;  no
>      idea where yum found this!  (The latest version of vim that 
>      yum finds on Fedora 5 is 7.0.042.) 

You'll have a hard time if you don't know how to use the "package 
manager". Because most mainstream Linux distributions are much bigger 
than a DVD and they won't install everything by default.

The installation media gives you a basic system, the package manager 
helps you find what you want in the remaining 100G.

(Continue reading)

Miklos Somogyi | 1 Mar 2010 08:27
Picon

Re: building console version on unices (was: iMac slow in vi)


On 27/02/2010, at 08:17 PM, Florian Rehnisch wrote:

> * Miklos Somogyi <msom <at> netspace.net.au> [100227 09:28]:
>> On 27/02/2010, at 06:20 PM, Florian Rehnisch wrote:
>> 
>>> You get a certain speedup when you use the console version and build vim
>>> w/o gui facilities.
>>> 
>>> This is my shell function receipt:
>>> #v+
>>> 
>>> function mkvim() { 
>>> ./configure  \
>>>     --prefix=/opt/vim \
>>>     --disable-gui \
>>>     --without-x \
>>>     --with-features=huge \
>>>     --enable-perlinterp \
>>>     --with-compiledby='Florian "eix" Rehnisch <eixman <at> gmx.de>' &&
>>> make
>>> }
> 
>> Having lurked here a few days I could see that vim has grown
>> enormously from my familiar vi, like word processor or more. I suspect
>> that contributes to the slowness of the complete system.
> 
> Ohh, that's not too bad.  Purists suggest nvi. ;-)
> 
>> I'd like to try building a console version as you suggests, but how do
(Continue reading)

Wincent Colaiuta | 1 Mar 2010 08:42
Favicon
Gravatar

Programmatically detect a current "highlight" setting?

I'm writing a plug-in and want to temporarily hide the cursor.

It would be really neat if I could do "highlight Cursor NONE" and
later restore the highlight setting to whatever it was before.

But I am not sure how to capture the old setting. Evidently "highlight
Cursor" _echoes_ the current setting, but doesn't actually return
anything that I could capture programmatically.

Anything I can do?

Cheers,
Wincent

--

-- 
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

Fritz Mehner | 1 Mar 2010 08:46
Picon
Favicon

Re: Can't remap <C-j>

sidgalt <at> gmail.com schrieb:
> Hey,
>
> I just installed a vim c/c++ plugin from here 
> http://www.vim.org/scripts/script.php?script_id=213.
>
> Now I'm unable to map <C-j> to any command (I usually map it to 4j)
>
> Any help would be appreciated.
>
> Thanks
> -- 
> 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
With the following two lines in my ~/.vimrc
the mapping for 'C-j' works for me:

let g:C_Ctrl_j       = 'off'

nmap <silent> <C-j>   4j

--

-- 
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

Tony Mechelynck | 1 Mar 2010 08:54
Picon
Gravatar

Re: Split window automatically when opening 2 or 3 files

On 03/01/10 21:39, Gary Johnson wrote:
> On 2009-12-31, Brock Henry 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?
>
> I don't have a Windows machine handy at the moment so I can't test
> this, but it seems to me that you should be able to test in your
> _vimrc for the presence of more than one file name in the argument
> list with the argc() function, then if the number of arguments is
> greater than 1, execute ":all".  See
>
>      :help argc()
>      :help :all
>
> HTH,
> Gary
>
>

Note that if you set 'winheight' to a high value in your vimrc in order 
to make window sizes change dynamically (and the current window always 
be the biggest one), you must use ":all" _before_ setting 'winheight', 
otherwise it won't work.
(Continue reading)

Tony Mechelynck | 1 Mar 2010 09:19
Picon
Gravatar

Re: how to open only session files?

On 31/12/09 07:43, Bee wrote:
> 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.
>

If you ":bd[elete]" or ":bw[ipe]" a file instead of just ":q[uit]"ting 
it, then neither the viminfo nor the session file will remember it -- 
unless you saved the viminfo with ":wv[iminfo]" while the file was still 
listed.

The session file is normally used to remember which files are in your 
windows and tabs. (It can also remember options, the buffer list, etc.) 
The buffer list is in addition to windows and tabs, and remembers (among 
others) the marks (including the latest cursor position) for each of the 
files in the buffer list.

See
	:help :bdelete
	:help :bwipe
	:help viminfo
	:help 'viminfo'
	:help :wviminfo
	:help 'sessionoptions'
	:help :mksession
(Continue reading)

Tony Mechelynck | 1 Mar 2010 11:46
Picon
Gravatar

Re: Programmatically detect a current "highlight" setting?

On 01/03/10 08:42, Wincent Colaiuta wrote:
> I'm writing a plug-in and want to temporarily hide the cursor.
>
> It would be really neat if I could do "highlight Cursor NONE" and
> later restore the highlight setting to whatever it was before.
>
> But I am not sure how to capture the old setting. Evidently "highlight
> Cursor" _echoes_ the current setting, but doesn't actually return
> anything that I could capture programmatically.
>
> Anything I can do?
>
> Cheers,
> Wincent
>

see
	:help :redir

You should reformat the captured string(s) to remove the xxx and add 
:hi! at the start.

A couple of caveats:
- a different reformat will be needed for a linked group, to replace 
"foo xxx links to bar" by "hi! link foo bar"
- You may need to prefix the capturing :hi command by 0verbose in order 
to make sure that your screen capture does _not_ include where the 
highlight was defined (see :help :verbose).

Best regards,
(Continue reading)


Gmane