linux terminal vim: use autogenerated servername by default

2015-01-15 Thread Enno
Under Windows, terminal Vim uses an automatically generated servername by 
default (assuming that Vim has +clientserver). Under Linux, this is disabled by 
default. 

Why, and is there a setting to change this? The procedure proposed at
 
http://vim.wikia.com/wiki/Enable_servername_capability_in_vim/xterm

is rather a workaround than enabling this in Terminal Vim by default.

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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: move tabs using mouse in gvim

2015-01-15 Thread Ben Fritz
On Wednesday, January 14, 2015 at 7:55:59 PM UTC-6, Matthew Jones wrote:
 On Wednesday, December 24, 2014 at 7:55:26 AM UTC-8, kamaraju kusumanchi 
 wrote:
  Is it possible to move tabs in a gvim window using mouse? Something similar 
  to the way we can move tabs across in chrome and firefox? In firefox, we 
  can even attach/detach tabs which would be really cool to have in gvim.
  
 
 
 You may need to add this to your .gvimrc: 
 
 set guioptions-=e

Thanks for that, I never would have guessed. On Windows at least, I can drag 
tabs when using the textual tabline, but not when using the native-gui-style 
guitablabel.

I.e. :set guioptions-=e looks a lot less like tabs in appearance, but behaves 
more like tabs than the real tabs used by default with 'e' in the guioptions.

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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problem with command on script

2015-01-15 Thread Cesar Romani

On 15/01/2015 03:05 a.m., Paul Isambert wrote:
 Le jeudi 15 janvier 2015 à 01:08, Cesar Romani a écrit:
 I'm using vim 7.4.580 on Windows 7. I have the following code to delete
 a displaced range of lines on a text:

 --
 function! Foobar(num) range
exe (a:firstline+a:num).','.(a:lastline+a:num).'d'
 endfunc
 com! -range -nargs=1 Foobar call Foobar(q-args)
 --

 When I select a range of lines and run 'call Foobar(5)' it works,
 but when I run 'Foobar 5' it doesn't work.

 Where can be the error?

 The range isn’t passed from the command to the function call; the
 command should be defined as:

  com! -range -nargs=1 Foobarline1,line2call Foobar(args)

 Best,
 Paul

Thanks Paul, it works.

Regards,

--
Cesar

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

--- 
You received this message because you are subscribed to the Google Groups vim_use group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: conceal and wrapping

2015-01-15 Thread Gary Johnson
On 2015-01-14, Christian Brabandt wrote:
 On Mi, 14 Jan 2015, Christian Brabandt wrote:
 
  Hi Gary!
  
  On Mi, 14 Jan 2015, Gary Johnson wrote:
  
   Given a line longer than the screen width so that it wraps at the
   screen edge, is it expected that concealing the first part of a line
   moves the line to the left but does not change the point in the line
   where it wraps?
  
  Yes, that is expected. See issue 260:
  https://code.google.com/p/vim/issues/detail?id=260
 
 But here is a different approach. Use
 :setl fdm=expr fex='1' fml=0
 :let l:fdt='matchstr(getline(v:foldstart).repeat( 
 ,70),''^.\{70}'').repeat( ,10)'
 
 This has only the drawback of disabling syntax highlighting.
 
 With a fancier foldtext setting you can also almost do anything (e.g. 
 strip the common path or so).

Clever!  I would never have thought to use 'foldtext' to format the
display of lines like that.

It took me a while to get it to work.  I changed fex to fde
('fex' is 'formatexpr') and added the optional third argument to
matchstr(), which I set to the length of the common path.

I like the behavior of conceal better for this application, but I'll
keep this trick in mind for other problems.  Thanks.

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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problem with command on script

2015-01-15 Thread Paul Isambert
Le jeudi 15 janvier 2015 à 01:08, Cesar Romani a écrit:
 I'm using vim 7.4.580 on Windows 7. I have the following code to delete
 a displaced range of lines on a text:
 
 --
 function! Foobar(num) range
   exe (a:firstline+a:num).','.(a:lastline+a:num).'d'
 endfunc
 com! -range -nargs=1 Foobar call Foobar(q-args)
 --
 
 When I select a range of lines and run 'call Foobar(5)' it works,
 but when I run 'Foobar 5' it doesn't work.
 
 Where can be the error?

The range isn’t passed from the command to the function call; the
command should be defined as:

com! -range -nargs=1 Foobar line1,line2call Foobar(args)

Best,
Paul

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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.