Re: Different working directories in different tabs

2011-06-01 Thread Martin Lundberg
On Tuesday, May 31, 2011 2:55:40 PM UTC+2, Christian Brabandt wrote:

 :h :lcd

 regards,
 Christian

Hi Christian. To my understanding that is not what I'm talking about. The 
:lcd command changes it for the current window. I'm talking about creating a 
new tab and changing the working directory using :cd. It changes the cwd for 
that tab only (you can even see the filenames of the other tabs changing on 
the tabs). If you then change back to another tab it's cwd has not changed.

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


Re: Different working directories in different tabs

2011-06-01 Thread Dennis Benzinger

Hello!

Am 01.06.2011 08:23, schrieb Martin Lundberg:

On Tuesday, May 31, 2011 2:55:40 PM UTC+2, Christian Brabandt wrote:


:h :lcd

regards,
Christian


Hi Christian. To my understanding that is not what I'm talking about. The
:lcd command changes it for the current window. I'm talking about creating a
new tab and changing the working directory using :cd. It changes the cwd for
that tab only (you can even see the filenames of the other tabs changing on
the tabs). If you then change back to another tab it's cwd has not changed.


If you create the new tab and lcd to another directory the current 
directory is set for the initial window on that tab. New windows opened 
on this tab (e.g. via split or enew) then inherit the current directory 
from the initial window.



Regards,
Dennis Benzinger

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


Re: gf and new tab

2011-06-01 Thread Jürgen Krämer

Hi,

eNG1Ne wrote:
 Chuffed at remembering, after seeing it go past in the group, that gf
 opens the file under the cursor … less chuffed that when I use gf to
 check an include file, this closes the file I'm currently working on :-
 { Any workarounds out there?

there are also Ctrl-Wf, which opens the file under the cursor in a
new window, and Ctrl-Wgf, which opens it in a new tab.

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

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


Re: Different working directories in different tabs

2011-06-01 Thread Gary Johnson
On 2011-05-31, Martin Lundberg wrote:
 On Tuesday, May 31, 2011 2:55:40 PM UTC+2, Christian Brabandt wrote:
 
 
 :h :lcd
 
 regards,
 Christian
 
 Hi Christian. To my understanding that is not what I'm talking about. The :lcd
 command changes it for the current window. I'm talking about creating a new 
 tab
 and changing the working directory using :cd. It changes the cwd for that tab
 only (you can even see the filenames of the other tabs changing on the tabs).
 If you then change back to another tab it's cwd has not changed.

There are two commands that change the working directory:  :cd,
which is global, and :lcd, which is window-local.  There is no
change-directory command whose scope is a tab.

That said, you could use the TabEnter autocommand event and a
tab-local variable to :cd to the working directory you define for
each tab.  That is, in each tab you could execute

:let t:wd = some/directory

and in your ~/.vimrc you could have an autocommand something like
this:

au TabEnter * if exists(t:wd) | exe cd t:wd | endif

See

:help TabEnter
:help t:var

Regards,
Gary

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


Re: Different working directories in different tabs

2011-06-01 Thread Martin Lundberg
Weird. I was 100% it did work yesteday when I was discussing this in the 
#vim irc channel. However now it works just as all of you've said. :) 

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


Re: Weird auto-comment after 72 lines

2011-06-01 Thread Efraim Yawitz
Try :help cinoptions (specifically, the *N value for which the help says:

*NVim searches for unclosed comments at most N lines away.  This
  limits the time needed to search for the start of a comment.
  (default 30 lines).

I think that the help may be out of date, because the code (in
get_c_indent(), misc1.c) has

int ind_maxcomment = 70;

which would explain the 72-line behavior (it searches back 70 lines for the
start of the comment, so line 71 works as expected, and line 72 doesn't.)

On Tue, May 31, 2011 at 9:44 PM, Gary Johnson garyj...@spocom.com wrote:

 On 2011-05-31, Fab wrote:
  Hi,
  I'm reporting a very strange behavior I have only noticed today on
  vim.
  If you open a C file (vim foo.c) and enter this text:
  /*
  then press ENTER
  vim will automatically align the comment and will insert automatically
  a space, star, space: ' * ' before every line.
 
  Unfortunately after 72 lines, this sort of convenient indentation
  capability stop working:
  vim insert only a star (no spaces), and sometimes (if previous text
  has some sort of indentation, it insert several spaces)
 


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


expand ( doesn't work

2011-06-01 Thread sinbad
hi,

doesn't expand(cword) work if the cursor is under (.
it works for ) though. any reason for this ?
i am running vim 7.0

thanks
sinbad

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


Re: [HELP]perl-support problem on gvim 7.3

2011-06-01 Thread Shlomi Fish
Hi,

On Wednesday 01 Jun 2011 04:51:01 zhang listar wrote:
 The os is windows xp sp3, with gvim 7.3.
 
 I am new to Perl, and want to use vim to edit perl, so I download
 perl-support and install it.
 
 But when I start gvim to edit a file say, test.pl. it gives the error as
 follows:
 
 can't locate Per/tags.pm  in @INC at (eval 9) line 1.
 

You have a copying error here - next time use your shell's session copy-and-
paste feature.

You probably mean you need to install this module - 
http://search.cpan.org/dist/Perl-Tags/ - so install it from CPAN.

 can't call method process on an undefined value at (eval 10) line 5

Can't help you with this one yet.

Regards,

Shlomi Fish

-- 
-
Shlomi Fish   http://www.shlomifish.org/
Understand what Open Source is - http://shlom.in/oss-fs

I simply hate, detest, loathe, despise, and abhor redundancy.
-- http://uncyclopedia.org/wiki/Redundancy

Please reply to list if it's a mailing list post - http://shlom.in/reply .

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


Re: Weird auto-comment after 72 lines

2011-06-01 Thread Thilo Six
Efraim Yawitz wrote the following on 01.06.2011 13:38

 Try :help cinoptions (specifically, the *N value for which the help says:
 
 *NVim searches for unclosed comments at most N lines away.  This
   limits the time needed to search for the start of a comment.
   (default 30 lines).

It seems that the above mentioned helptext already got updated in the mercurial
repo:

,[ :h indent.txt ]

*cino-star*
*NVim searches for unclosed comments at most N lines away.  This
  limits the time needed to search for the start of a comment.
  If your /* */ comments stop indenting afer N lines this is the
  value you will want to change.
  (default 70 lines).
`-

-- snip --

-- 
bye Thilo

4096R/0xC70B1A8F
721B 1BA0 095C 1ABA 3FC6  7C18 89A4 A2A0 C70B 1A8F


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


Folding

2011-06-01 Thread Eric Weir

I'm a Vim novice, and a writer not a programmer. I've perused the responses to 
questions about folding in the Vim FAQ. It's largely Greek to me. I have a 
couple questions: I understand folds can be indented. Is it possible to get Vim 
to wrap words to the indent column? Is there a way I can get folds to persist 
across a save and reload?

Thanks,
--
Eric Weir
Decatur, GA  USA
eew...@bellsouth.net




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


vim and *.doc

2011-06-01 Thread Rodrigo Filippi
Hi buddies
Anyone have any idea of a plugin or add-on which will work Msoffice
documents (Word in particular) in the vim way?

Regards
Rodrigo

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


Re: vim and *.doc

2011-06-01 Thread Marc Weber
Excerpts from Rodrigo Filippi's message of Wed Jun 01 16:09:58 +0200 2011:
 Anyone have any idea of a plugin or add-on which will work Msoffice
 documents (Word in particular) in the vim way?

Can't you just use google and try
vim microsoft office
vim emulation office
vi keys office

If this all doesn't work you you can get some very bad emulation for any
win app using this:
https://github.com/MarcWeber/autohotkey_viper

However it still needs some work.

or such?
Marc Weber

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


Re: expand ( doesn't work

2011-06-01 Thread Gary Johnson
On 2011-06-01, sinbad wrote:
 hi,
 
 doesn't expand(cword) work if the cursor is under (.
 it works for ) though. any reason for this ?
 i am running vim 7.0

I'm running 7.3.189 and it behaves differently.  I started vim as

$ vim -N -u NONE

and used the line

Now is the (time) for all good men

and the command

:echo expand(cword)

with the following results.

 Cursor   Command
Location  Output
  ---
   (   time
   t   time
   e   time
   )   for

So, cword appears to refer to the word under the cursor or to
the first word to the right if the cursor is not on a word.  This
agrees with the documentation:

:help cword
:help star

The behavior at 5.4m.23 was to expand cword to an empty string.
(See $VIMRUNTIME/doc/version5.txt.)  I don't know when this changed
to the current behavior or what the behavior was at 7.0.

Regards,
Gary

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


Re: Plugin to continue text at top

2011-06-01 Thread Charles Campbell

Gísli Freyr Brynjarsson wrote:

Hi guys

When I was reading an article the other day I came across a complaint
from some IT-guy that he missed that today's editors, when they had
reached last line, couldn't expand and continue the file in an
attached window. In the answers someone said that Vim could infact do
this. I asked him how it's done but he won't answer me.

So the plugin/script would work like this:
Let's say you have a gvim window which, from top to bottom, has 50
lines. When you finish writing in the 50th line and hit enter GVim
would automatically make an attached window right next to where you
were writing so the 51st line would go on the top inline with the 1st
line. I'll try and demonstrate it with a picture with only 5 lines.

|| 1st line || 6th line || 11th line ||
|| 2nd line|| 7th line || 12th line ||
|| 3rd line || 8th line || 13th line ||
|| 4th line || 9th line || 14th line ||
|| 5th line ||   10th line || 15th line ||

If this script exists and you know where it can be found than that
info would be greatly appreciated.
If on the other hand it doesn't exist than I would appreciate your
input on how I could, for a lack of a better word, engineer it myself.
   


Hello,

You can try mpage.vim out; its not exactly what you're asking for, but:

* let g:mpage_autonxtwin= 1   -- put this into your .vimrc to enable 
automatic next-mpage-window advancing when in insert mode
* when editing a file, use  :MPage [splits]  -- pick how many 
mpage-controlled window you want


You may get mpage.vim from  
http://mysite.verizon.net/astronaut/vim/index.html#MPAGE


Regards,
Chip Campbell

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