John Beckett | 1 Mar 01:25 2010
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 01:27 2010
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

winterTTr | 1 Mar 02:30 2010
Picon

Re: Any limitation of autocmd when the bufdo is processing ?

On Fri, Feb 26, 2010 at 3:41 PM, winterTTr <winterTTr.vim <at> gmail.com> wrote:
Actually, i meet a problem like below.
I tried to update a specific "unlisted" buffer every time the BufEnter event happens.

the Code like below( just an example, not the real code ):
I am trying to use the "set eventignore+=BufEnter" and "set eventignore-=BufEnter" to prevent the
process from running recursively.

--------------------------begin-----------------------------------
function! TestFunc()
    set eventignore+=BufEnter

    let bufname = bufname("%")
    " move to specific window
    2wincmd w
    " update buffer
    call append( 0 , bufname )
    " move back
    1wincmd w

    set eventignore-=BufEnter
endfunction

autocmd BufEnter * call TestFunc()
--------------------------end--------------------------------------

Everything is OK until i do the bufdo command. such as "bufdo s/^/1/"
"E474: Invalid argument: eventignore+=BufEnter" message is shown.

I can NOT find any information in the documentation showing any limitation during the bufdo command.
And I hope anyone could give the answer to the following question:
1. Is there a limitation that you can NOT set the variable "eventignore" during the bufdo process?
2. If so, is the "eventignore" the only one or are there any other variable that have the same limitation?
3. Someone told me that the ""set eventignore+=BufEnter" is unnecessary, cause the "bufdo" itself would
    prevent the recursive running ? Is this the truth ?

Anyone can give some idea ? :-)
 


If you really want to reproduce the error, i attach the file to do this. Please follow the next step:
1. source the test.vim
2. run a bufdo command, such as ""bufdo s/^/1/"
And , the error would be shown.

--
You received this message from the "vim_dev" 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 03:49 2010

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
Press ENTER or type command to continue
Error detected while processing function <SNR>12_CheckAlign:
line   26:
E15: Invalid expression: inda % 50
Press ENTER or type command to continue
Error detected while processing function <SNR>12_CheckAlign:
line   28:
E121: Undefined variable: indatabs
Press ENTER or type command to continue
Error detected while processing function <SNR>12_CheckAlign:
line   28:
E15: Invalid expression: indatabs*&tabstop + indaspace == indb
Press ENTER or type command to continue

Posting this only for informative purposes - so far, I'm happy
with version 1.4.1.

Thanks again!
-- 
Michael Ludwig

--

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

pansz | 1 Mar 04:51 2010

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.

--

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

Miklos Somogyi | 1 Mar 08:27 2010
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
>> I get to do it?
> 
> Tony made a HowTo on compiling Vim on unices.  See 
> http://users.skynet.be/antoine.mechelynck/vim/compunix.htm
> See also ':h usr_90'.
> 
>> And where is the place of your shell function
>> receipt?
> 
> It lives as a stanza in my ~/.zshrc.  Bash users go with ~/.bashrc.
> Lovers of small inition files would put the part between {} in a shell
> script ~/bin/mkvim, whoose first line is sth. like '#!/bin/sh'.
> 
> Still questions? Don't refrain to ask ;-)
> -- 
> flori
> Vim-Hilfe auf Deutsch         http://www.florianrehnisch.de/vimhelp/
> WARNING: PRGRAMMING BUG IN E2FSCK!
>        OR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.
> 
> -- 
> 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

Thank you Florian,

As I am not a big Nix-er, I'll need a very calm day alone to go through with this installation.
I'm sure I'll need to find and download a lot of things Vim needs.
Probably I'll do what you suggested because vim's slowness really bothers me.

Again, thank you,

Miklos

--

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

Wincent Colaiuta | 1 Mar 08:42 2010

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 08:46 2010
Picon

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 08:54 2010
Picon

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.

Best regards,
Tony.
-- 
It is generally agreed that "Hello" is an appropriate greeting because
if you entered a room and said "Goodbye," it could confuse a lot of
people.
		-- Dolph Sharp, "I'm O.K., You're Not So Hot"

--

-- 
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 09:19 2010
Picon

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

Best regards,
Tony.
-- 
If little green men land in your back yard, hide any little green women
you've got in the house.
		-- Mike Harding, "The Armchair Anarchist's Almanac"

--

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


Gmane