Re: any 'tagrelative' option for cscope?

2011-04-20 Thread pansz
On Wed, Apr 20, 2011 at 1:53 PM, Christian Brabandt cbli...@256bit.org wrote:
 Hi pansz!

 On Di, 19 Apr 2011, pansz wrote:
 By default, vim opens all file of ctags with directory relative to the tags
 file. This behaviour can be controlled by 'tagrelative' option.

 But for cscope, vim does not open file relative to directory where
 cscope.out lies, instead, it uses CWD.

 That has recently been discussed on vim-dev and there was a patch
 proposed:
 https://groups.google.com/group/vim_dev/browse_frm/thread/f1304184bc1e5e9a

Great! I'll apply the patch and try it out.

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


Re: Adding Session Awareness to a Plugin

2011-04-20 Thread Mathew Brown
Hi Marc,

  Could you get into a little more detail?  I don't really have any
  experience in writing a plugin.  All I'm trying to do is patch one so
  that it is session aware.  Thanks a lot.


On Mon, 18 Apr 2011 23:28 +0200, Marc Weber marco-owe...@gmx.de
wrote:
 There are alternatives: Use a local .vimrc file and source that. Then
 put your configuration in there manually. Use a plugin such as reload to
 speed up applying changes.
 
 If we could settle on such a local .vimrc we could make plugins add
 default configuration lines to that file.
 
 That would be reasonable fast and scale much better than your plugin
 only solution because you can add sw tabstop, .. settings as well.
 
 And its declarative which means you can read the file again.
 However its much harder to read a session file.
 
 Loading local .vim files can be dangerous. That's why I made Vim keep a
 hash. If that changes you must confirm sourcing the file.
 
 If you're interested in it I'll turn it into a plugin. (its still
 contained in the deprecated tovl library).
 
 Even more nifty: You can share your setup then. Sharing session files
 works - but .. *shrug* - I don't want your runtimepath settings :)
 
 So I'd settle on local configuration files..
 
 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
 
-- 
  Mathew Brown
  mathewbr...@fastmail.fm

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service

-- 
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: Lost Blowfish Key

2011-04-20 Thread Mathew Brown
Hi Eric,

Thanks a lot.  I'll give it a try and hopefully can retrieve the file
again :)


On Mon, 18 Apr 2011 16:37 -0600, Erik Falor ewfa...@gmail.com wrote:
 On Mon, Apr 18, 2011 at 12:29:29PM -0700, Mathew Brown wrote:
  Hi,
I had several files that were encrypted using the Blowfish algorithm. 
All of the files were encrypted using the same passphrase.  However,
after exiting Vim a few days ago, when I tried to open them again, all
of them successfully opened except for one file.  Is there any way
that I can feed a password list to vim and it can try to open the file
using this list (I would generate the list based on permutations of my
passphrase)?  I know quite a bit of the text that was in the file. 
Any ideas?  Thanks for your help.
 
 # use each passphrase from file keys to open the file in vim and
 # re-write it into a new file named for the passphrase (hope your
 # passphrase didn't have any spaces in it!)
 $ for key in $(cat keys); do vim blowfish.txt --cmd set key=$key\
 -c :set key= | saveas $key | q; done
 
 Now find which files look like ASCII text to the file command:
 $ file * | grep ASCII text
 
 -- 
 Erik Falor
 Registered Linux User #445632 http://counter.li.org
 
 Email had 1 attachment:
 + Attachment2
   1k (application/pgp-signature)
-- 
  Mathew Brown
  mathewbr...@fastmail.fm

-- 
http://www.fastmail.fm - The professional email service

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


how to install Nerd tree plaugin/eom

2011-04-20 Thread vicky b
-- 
*Thanks  Regards
 Vickyb

*

-- 
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: how to install Nerd tree plaugin/eom

2011-04-20 Thread vicky b
sorry to spam you i was able to do it.

On Wed, Apr 20, 2011 at 12:22 PM, vicky b vickyb2...@gmail.com wrote:



 --
 *Thanks  Regards
  Vickyb

 *




-- 
*Thanks  Regards
 Vickyb

*

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


standard ubuntu lucid vim package is not +multibyte

2011-04-20 Thread Eric Smith
Why is this and how do I without having to compile, get back the 
mutibyte vim that I know and love in 7.3?

-- 
- Eric Smith

-- 
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: standard ubuntu lucid vim package is not +multibyte

2011-04-20 Thread tux.
Eric Smith schrob am 20.04.2011 13:04:
 Why is this

Because Dumbuntu sucks.

 and how do I without having to compile, get back the 
 mutibyte vim that I know and love in 7.3?

It won't work without compiling.

-- 
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: standard ubuntu lucid vim package is not +multibyte

2011-04-20 Thread H Xu

On 04/20/2011 07:04 PM, Eric Smith wrote:

Why is this and how do I without having to compile, get back the
mutibyte vim that I know and love in 7.3?



Post a message to the Ubuntu mailing list to ask them to do so.

https://lists.ubuntu.com/

--
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: standard ubuntu lucid vim package is not +multibyte

2011-04-20 Thread Christian Brabandt
Hi Eric!

On Mi, 20 Apr 2011, Eric Smith wrote:

 Why is this and how do I without having to compile, get back the 
 mutibyte vim that I know and love in 7.3?

What package have you installed?

The normal package should be compiled with +multibyte. Make sure, you 
don't have the tiny package installed. If you do, install one of the 
many other flavors (vim, vim-nox, vim-gnome, vim-gtk, ...)

regards,
Christian
-- 

-- 
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: Lost Blowfish Key

2011-04-20 Thread Tim Chase

On 04/20/2011 01:50 AM, Mathew Brown wrote:

Thanks a lot.  I'll give it a try and hopefully can retrieve the file
again :)


$ for key in $(cat keys); do vim blowfish.txt --cmd set key=$key\
 -c :set key= | saveas $key | q; done


Just as a caveat, this will expose your passwords in the 
process-list and on the hard-drive in the file-names.  If you're 
the only user of the system, I'd not be overly concerned.  If you 
share the system with other concurrent users, I'd try to tweak it 
to be pure vim:


 vi -o keys.txt encrypted.txt

and then in the 'keys.txt' file, execute the following:

let i=0|g/^/let i+=1|let key=getline('.')|wincmd b|let 
key=key|e|let key=''|exec 'w '.i|wincmd t



(this assumes that the auto-split puts keys.txt in the top window 
and encrypted.txt in the bottom window...if they appear the other 
way around, swap the wincmd commands for top/bottom)


This will produce files on your drive named 1 through the 
number of lines in keys.txt which will be the index of the 
password.  You can then use Erik's file command to determine 
which index contains the ASCII data.  This should keep things 
less exposed.


-tim


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


Problems with my .vimrc

2011-04-20 Thread Tobias Lindgaard
My problem is that my keymappings doesn't seem to work.
But that would not be particularly strange it only happens to some of
them
for instance I have changed ; to : in normal-mode and visual-mode
but all that starts with either LEADER or ',' or '\' seems to be
broken.


my vimrc:
silent! call pathogen#runtime_append_all_bundles()
silent! call pathogen#helptags()
nmap LEADERnn :colorscheme navajo-nightCR
nmap ,bn ESC:bnCR
nmap ,bp ESC:bpCR
nmap ,bd ESC:bdCR
nmap ,ne ESC:NERDTreeCR
nmap ,nc ESC:NERDTreeCloseCR
nnoremap : ;
nnoremap ; :
vnoremap : ;
vnoremap ; :
cnoremap ; :
cnoremap : ;
 I just happen to edit a lot of latex stuff for my local chessclub,
and these
 are in high use, as they include a big part of my native language.
nmap F3 ESC:GundoToggleCR
nmap LEADERo ESC:so ~/.vimrcCR
 One thing to remember C-[ actually = ESC!
map C-h C-Wh
map C-j C-Wj
map C-k C-Wk
map C-l C-Wl
nmap ,c :onlyCR
map ,sp ESC:spCR

set nocp No compatability.
set expandtab
set noautoindent
set nohls
set tw=0
set ruler
set laststatus=2
set wildmenu
set showcmd
set nu  Put line numbers
set hidden  the mysterius hidden, which makes vim more graceful about
 changing away from files that have changes..
 Fold Section
set foldlevel=0  fold level says don't fold automatically
set foldmethod=manual
set foldenable
 Done Fold section
set nobackup  I really don't like ~ files.
set nowritebackup  I don't like any backup files..
set noswapfile  I hate .swp files.
set tabstop=2
set showmatch  Shows matchin paren
set statusline=\ File:\ %F%m%r%h\ %w\ \ \ Current\ dir:\%r%{getcwd()}
%h

colors xoria256  I kind of like this however navajo-night is also
good.

Navajo-night is kind of what I would use for nighttime, if I had no
light on.
 This is for some latex stuff.
 Mostly relevant if I get the magasine in our chess club
filetype plugin on
filetype indent on
let g:tex_flavor='latex'

all my spell mistakes.
iab helo hello
iab gyu guy
iab thansk thanks
iab mster master
iab mastre master
iab musci music
iab hell  hello

-- 
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: Screenplay-Text Syntax File Misbehaving

2011-04-20 Thread Andy Wokula

Am 19.04.2011 10:59, schrieb Shlomi Fish:

Hi all,

I prepared a partial syntax file for Screenplay-Text here:

http://svn.berlios.de/svnroot/repos/web-cpan/XML-Grammar-Fiction/trunk/vim

It's attached to this message.

You can learn more about Screenplay-Text here - http://xrl.us/bjswbo . Here
are the homepages of the implementation:

http://www.shlomifish.org/open-source/projects/XML-Grammar/Fiction/

http://web-cpan.berlios.de/modules/XML-Grammar-Screenplay/

The problem is that when I edit a screenplay, often the highlighting of the
addressing disappears and other weird stuff happens and I don't know what I'm
doing wrong. I'm attaching here a sample screenplay (under CC-by-sa). If I
position the screen starting from line 7, and then I travel with the cursor up
and down, then I get that part of the description (what comes between [ and
]) gets unhighlighted, and lots of other stuff like that when editing a
screenplay.

There are similar screenplays that exhibit similar problems here:

http://www.shlomifish.org/humour/stories/

Can anyone instruct me how to fix it?

Regards,

Shlomi Fish


No answers yet, so I have a few hints ...


You should add a syncing rule, for example

:syn sync minlines=50

:h :syn-sync

 there are more methods!


Multi-line matches like the following

:syntax match screenplayTextComment /!--\_.\{-0,}--/
:syntax match screenplayTextDescription /^ *\[\_.\{-0,}\]/

are better written using :syn-region

:syntax region screenplayTextDescription start=^ *\[ end=]
etc.


This does nothing:

let b:current_syntax=ScreenplayText
runtime! syntax/xml.vim

... syntax/xml.vim immediately finishes when b:current_syntax is set.

Could be this was your way of commenting out the :runtime statement ...
I guess you will only want to borrow a few rules from the xml syntax
file and not include it completely.


--
Andy

--
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: Problems with my .vimrc

2011-04-20 Thread Ben Schmidt

nmap ,bn ESC:bnCR

...

nnoremap : ;


So first the nmap types Esc, but you are already in Normal mode, so
Esc usually just beeps, which might abort the mapping; so that's not a
good idea.

Even if it does get past that, though, it then types : but : has been
mapped to ; so instead of doing :bnCR it does ;bnCR (repeat last f
or t search in the same direction, or if there isn't one, probably just
beep and abort the mapping; or if it gets past that, then go back a
word, repeat the last search, and probably abort if the pattern is not
found, and then move down a line).

Try :nnoremap in place of :nmap even for the ones which don't swap keys
and see how far that gets you.

Smiles,

Ben.



--
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: Problems with my .vimrc

2011-04-20 Thread Ben Schmidt

On 20/04/11 11:49 PM, Ben Schmidt wrote:

nmap ,bn ESC:bnCR

...

nnoremap : ;


So first the nmap types Esc, but you are already in Normal mode, so
Esc usually just beeps, which might abort the mapping; so that's not a
good idea.

Even if it does get past that, though, it then types : but : has been
mapped to ; so instead of doing :bnCR it does ;bnCR (repeat last f
or t search in the same direction, or if there isn't one, probably just
beep and abort the mapping; or if it gets past that, then go back a
word, repeat the last search, and probably abort if the pattern is not
found, and then move down a line).

Try :nnoremap in place of :nmap even for the ones which don't swap keys
and see how far that gets you.


O, and leave out the Esc. E.g.

:nnoremap ,bn :bnCR

Smiles,

Ben.



--
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: Problems with my .vimrc

2011-04-20 Thread Tobias Lindgaard
On Wed, Apr 20, 2011 at 3:52 PM, Ben Schmidt
mail_ben_schm...@yahoo.com.au wrote:
 On 20/04/11 11:49 PM, Ben Schmidt wrote:

 nmap ,bn ESC:bnCR

 ...

 nnoremap : ;

 So first the nmap types Esc, but you are already in Normal mode, so
 Esc usually just beeps, which might abort the mapping; so that's not a
 good idea.

 Even if it does get past that, though, it then types : but : has been
 mapped to ; so instead of doing :bnCR it does ;bnCR (repeat last f
 or t search in the same direction, or if there isn't one, probably just
 beep and abort the mapping; or if it gets past that, then go back a
 word, repeat the last search, and probably abort if the pattern is not
 found, and then move down a line).

 Try :nnoremap in place of :nmap even for the ones which don't swap keys
 and see how far that gets you.

 O, and leave out the Esc. E.g.

 :nnoremap ,bn :bnCR

 Smiles,

 Ben.





-- 
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: Problems with my .vimrc

2011-04-20 Thread Tobias Lindgaard
It turns out that my mappings to change ; : aren't to clever so I just
dump that.
It destroys a lot of things with plugins who are giving keybindings..
So I just reverted that change

On Wed, Apr 20, 2011 at 4:01 PM, Tobias Lindgaard
tobias.priv...@gmail.com wrote:
 On Wed, Apr 20, 2011 at 3:52 PM, Ben Schmidt
 mail_ben_schm...@yahoo.com.au wrote:
 On 20/04/11 11:49 PM, Ben Schmidt wrote:

 nmap ,bn ESC:bnCR

 ...

 nnoremap : ;

 So first the nmap types Esc, but you are already in Normal mode, so
 Esc usually just beeps, which might abort the mapping; so that's not a
 good idea.

 Even if it does get past that, though, it then types : but : has been
 mapped to ; so instead of doing :bnCR it does ;bnCR (repeat last f
 or t search in the same direction, or if there isn't one, probably just
 beep and abort the mapping; or if it gets past that, then go back a
 word, repeat the last search, and probably abort if the pattern is not
 found, and then move down a line).

 Try :nnoremap in place of :nmap even for the ones which don't swap keys
 and see how far that gets you.

 O, and leave out the Esc. E.g.

 :nnoremap ,bn :bnCR

 Smiles,

 Ben.






-- 
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: Problems with my .vimrc

2011-04-20 Thread ZyX
Reply to message «Re: Problems with my .vimrc», 
sent 18:07:39 20 April 2011, Wednesday
by Tobias Lindgaard:

 It turns out that my mappings to change ; : aren't to clever so I just
 dump that.
 It destroys a lot of things with plugins who are giving keybindings..
 So I just reverted that change
You should write a bug report for each of these plugins: every clever plugin 
writer uses `*noremap' unless he wants to deal with such bugs.

Original message:
 It turns out that my mappings to change ; : aren't to clever so I just
 dump that.
 It destroys a lot of things with plugins who are giving keybindings..
 So I just reverted that change
 
 On Wed, Apr 20, 2011 at 4:01 PM, Tobias Lindgaard
 
 tobias.priv...@gmail.com wrote:
  On Wed, Apr 20, 2011 at 3:52 PM, Ben Schmidt
  
  mail_ben_schm...@yahoo.com.au wrote:
  On 20/04/11 11:49 PM, Ben Schmidt wrote:
  nmap ,bn ESC:bnCR
  
  ...
  
  nnoremap : ;
  
  So first the nmap types Esc, but you are already in Normal mode, so
  Esc usually just beeps, which might abort the mapping; so that's not a
  good idea.
  
  Even if it does get past that, though, it then types : but : has been
  mapped to ; so instead of doing :bnCR it does ;bnCR (repeat last f
  or t search in the same direction, or if there isn't one, probably just
  beep and abort the mapping; or if it gets past that, then go back a
  word, repeat the last search, and probably abort if the pattern is not
  found, and then move down a line).
  
  Try :nnoremap in place of :nmap even for the ones which don't swap keys
  and see how far that gets you.
  
  O, and leave out the Esc. E.g.
  
  :nnoremap ,bn :bnCR
  
  Smiles,
  
  Ben.


signature.asc
Description: This is a digitally signed message part.


Re: Problems with my .vimrc

2011-04-20 Thread Tobias Lindgaard
Hmm it just seemed that lusty had such a problem. But i am not since sure
about it.

Anyway it is nice to have my own mappings working as expected.
Den 20/04/2011 17.45 skrev ZyX zyx@gmail.com:
 Reply to message «Re: Problems with my .vimrc»,
 sent 18:07:39 20 April 2011, Wednesday
 by Tobias Lindgaard:

 It turns out that my mappings to change ; : aren't to clever so I just
 dump that.
 It destroys a lot of things with plugins who are giving keybindings..
 So I just reverted that change
 You should write a bug report for each of these plugins: every clever
plugin
 writer uses `*noremap' unless he wants to deal with such bugs.

 Original message:
 It turns out that my mappings to change ; : aren't to clever so I just
 dump that.
 It destroys a lot of things with plugins who are giving keybindings..
 So I just reverted that change

 On Wed, Apr 20, 2011 at 4:01 PM, Tobias Lindgaard

 tobias.priv...@gmail.com wrote:
  On Wed, Apr 20, 2011 at 3:52 PM, Ben Schmidt
 
  mail_ben_schm...@yahoo.com.au wrote:
  On 20/04/11 11:49 PM, Ben Schmidt wrote:
  nmap ,bn ESC:bnCR
 
  ...
 
  nnoremap : ;
 
  So first the nmap types Esc, but you are already in Normal mode, so
  Esc usually just beeps, which might abort the mapping; so that's not
a
  good idea.
 
  Even if it does get past that, though, it then types : but : has been
  mapped to ; so instead of doing :bnCR it does ;bnCR (repeat last
f
  or t search in the same direction, or if there isn't one, probably
just
  beep and abort the mapping; or if it gets past that, then go back a
  word, repeat the last search, and probably abort if the pattern is
not
  found, and then move down a line).
 
  Try :nnoremap in place of :nmap even for the ones which don't swap
keys
  and see how far that gets you.
 
  O, and leave out the Esc. E.g.
 
  :nnoremap ,bn :bnCR
 
  Smiles,
 
  Ben.

-- 
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: Lost Blowfish Key

2011-04-20 Thread Mathew Brown
Thanks a lot Tim.

On Wed, 20 Apr 2011 06:53 -0500, Tim Chase v...@tim.thechases.com
wrote:
 On 04/20/2011 01:50 AM, Mathew Brown wrote:
  Thanks a lot.  I'll give it a try and hopefully can retrieve the file
  again :)
 
  $ for key in $(cat keys); do vim blowfish.txt --cmd set key=$key\
   -c :set key= | saveas $key | q; done
 
 Just as a caveat, this will expose your passwords in the 
 process-list and on the hard-drive in the file-names.  If you're 
 the only user of the system, I'd not be overly concerned.  If you 
 share the system with other concurrent users, I'd try to tweak it 
 to be pure vim:
 
   vi -o keys.txt encrypted.txt
 
 and then in the 'keys.txt' file, execute the following:
 
 let i=0|g/^/let i+=1|let key=getline('.')|wincmd b|let 
 key=key|e|let key=''|exec 'w '.i|wincmd t
 
 
 (this assumes that the auto-split puts keys.txt in the top window 
 and encrypted.txt in the bottom window...if they appear the other 
 way around, swap the wincmd commands for top/bottom)
 
 This will produce files on your drive named 1 through the 
 number of lines in keys.txt which will be the index of the 
 password.  You can then use Erik's file command to determine 
 which index contains the ASCII data.  This should keep things 
 less exposed.
 
 -tim
 
 
 
-- 
  Mathew Brown
  mathewbr...@fastmail.fm

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

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


scripting question

2011-04-20 Thread niva
Hi,

I am writing a script and have to detect some features of the opened
file.

my vimscript contains a recursive conditional blocks

if cond1

else

   if cond2

 if condN etc...

   else

   endif

endif


I would like to replace that by an object approach but how can I do
plaese ?

I suppose
if s:myDetecFunc1 automatically call the assiociated task

Thank you for helping








-- 
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: standard ubuntu lucid vim package is not +multibyte

2011-04-20 Thread Jeff Wheeler
On Wed, Apr 20, 2011 at 6:11 AM, tux. der_tux...@arcor.de wrote:

 Because Dumbuntu sucks.

Did you seriously just say an entire OS sucks because an old version
of the OS is shipping an old version of Vim?

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign

-- 
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: scripting question

2011-04-20 Thread Tim Chase

On 04/20/2011 02:08 PM, niva wrote:

Hi,

I am writing a script and have to detect some features of the opened
file.

my vimscript contains a recursive conditional blocks

if cond1
else
if cond2
  if condN etc...
else
endif
endif


I would like to replace that by an object approach but how can I do
plaese ?


(just a nomenclature thing, this is deep-nesting, not recursion)

Without details regarding your tests, it's hard to produce a good 
answer.  Are they all just tests for equality against some constant?


  if foo==1
   if foo==2
if foo==3
   ...

Or are they more complex tests like

  if foo==1
   if bar2
if baz15
   ...

What are you doing at each point?  Just assigning a value to an 
outside value, or are you doing more complex logic and/or 
multiple actions?


-tim

--
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: standard ubuntu lucid vim package is not +multibyte

2011-04-20 Thread tux.
Jeff Wheeler schrob am 20.04.2011 21:20:

 Did you seriously just say an entire OS sucks because an old version
 of the OS is shipping an old version of Vim?

Nope, it sucks generally. Ubuntu is like Debian's crippled half-brother.
More security holes, more shiny ooohhh look what I can do!, less Linux
anyway.

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


Vimscript Question

2011-04-20 Thread niva
Hi,


I am writing a vimscript that contains recursivecondition block.

if cond1

else
  if cond2
  else
 if condN
 else
 
 endif
  endif
endif

How canI code to avoidrecursive conditional block and have an object
approach?

Thank you

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


editing vim help files

2011-04-20 Thread Adam Monsen
Anyone handy with editing help files? I'm wondering how to align a
title and tag, ala

SPONSOR VIM DEVELOPMENT *sponsor*

where the title is left-aligned and the tag right-aligned, on the
same line.

The vim (built-in) help files seem consistent enough, I'm wondering
what functions/mappings/etc. folks use to edit them. Or is all that
lining up just done by hand?

I do notice that Tabular.vim should be useful for this purpose.
Pros, is that what you use?

-- 
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: Dvorak and hjkl

2011-04-20 Thread gonzih
i remap keys using that solution 
http://stackoverflow.com/questions/165231/vim-dvorak-keybindings-rebindings/165252#165252
but i still cant remap keys to switch between panes

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


problems with using gundo

2011-04-20 Thread zidar
Hello,

I have just started using vim, and I would really like give it a fair
chance, since it sounds like an awesome editor.
First thing i did was install python syntax highlighting, witch looked
really nice.

Then i tried installing gundo, and here is where my problems started.
First thing i saw was:
install details
Use Pathogen.

No, seriously.

Okay, what is pathogen? After a quick google search i found
pathogen.vim . So I installed that the way it said on the page, and I
still have no clue how to make gundo work.

So i have downloaded gundo, put it in ~/.vim/bundle/gundo and i've put
nnoremap F5 :GundoToggleCR in .vimrc .

And I still get not an editor command: GundoToggle after i press
F5.


I realize it's a bit hard getting started on something new like vim,
but install notes like use Pathonge, No, seriously. Are really
annoying when you don't have a clue how to do something.


Sorry for this half rent half question. I still hope someone could
help me with this noob problem.

Thank you, Zidar.

-- 
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: Screenplay-Text Syntax File Misbehaving

2011-04-20 Thread Shlomi Fish
Hi Andy,

On Wednesday 20 Apr 2011 11:26:06 Andy Wokula wrote:
 Am 19.04.2011 10:59, schrieb Shlomi Fish:
  Hi all,
  
  I prepared a partial syntax file for Screenplay-Text here:
  
  http://svn.berlios.de/svnroot/repos/web-cpan/XML-Grammar-Fiction/trunk/vi
  m
  
  It's attached to this message.
  
  You can learn more about Screenplay-Text here - http://xrl.us/bjswbo .
  Here are the homepages of the implementation:
  
  http://www.shlomifish.org/open-source/projects/XML-Grammar/Fiction/
  
  http://web-cpan.berlios.de/modules/XML-Grammar-Screenplay/
  
  The problem is that when I edit a screenplay, often the highlighting of
  the addressing disappears and other weird stuff happens and I don't know
  what I'm doing wrong. I'm attaching here a sample screenplay (under
  CC-by-sa). If I position the screen starting from line 7, and then I
  travel with the cursor up and down, then I get that part of the
  description (what comes between [ and ]) gets unhighlighted, and
  lots of other stuff like that when editing a screenplay.
  
  There are similar screenplays that exhibit similar problems here:
  
  http://www.shlomifish.org/humour/stories/
  
  Can anyone instruct me how to fix it?
  
  Regards,
  
  Shlomi Fish
 
 No answers yet, so I have a few hints ...
 

Thanks for your hints. I'll try to implement them and let you know of my 
progress.

Regards,

Shlomi Fish

[SNIPPED]

-- 
-
Shlomi Fish   http://www.shlomifish.org/
Apple Inc. is Evil - http://www.shlomifish.org/open-source/anti/apple/

Real programmers don't write workarounds. They tell their users to upgrade
their software.

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: any 'tagrelative' option for cscope?

2011-04-20 Thread Raghavendra D Prabhu

* On Tue, Apr 19, 2011 at 08:18:07PM -0700, pansz pan.shi...@gmail.com wrote:

By default, vim opens all file of ctags with directory relative to the tags
file. This behaviour can be controlled by 'tagrelative' option.

But for cscope, vim does not open file relative to directory where
cscope.out lies, instead, it uses CWD.

Build cscope.out with absolute path can solve some problem but that really
isn't ideal: When you do :cs find, quickfix window filled with file names
and occurrences. The file names are usually too long with absolute path and
it often is better to show them with relative path (may be even better to
show them with abbreviated path or remove the largest-common-part of path).

Is it possible to give cscope first-class citizenship like ctags, such as
out-of-box support for option like 'tagrelative'?

I faced the same issue few days back. So I wrote the patch for
cscope (the one submitted to vim_dev), it introduces a boolean
variable called cscoperelative for that. The patch applies to vim
git master branch.


pgpyzcmGi6v69.pgp
Description: PGP signature


Re: Vimscript Question

2011-04-20 Thread Marc Weber
Excerpts from niva's message of Wed Apr 20 21:25:48 +0200 2011:
 Hi,
 
 
 I am writing a vimscript that contains recursivecondition block.
 
 if cond1
 
 else
   if cond2
   else
  if condN
  else
  
  endif
   endif
 endif
 
 How canI code to avoidrecursive conditional block and have an object
 approach?

Talk about your use case. Copy paste more code so that we know what the
hell you're talking about. I don't see object usage here.

let conditions = [['a=7','echo 7'],['a=8','echo 8']]

for [c,action] in conditions
  exec 'let c_result = '.action
  if c_result
exec action
  endif
  unlet c, c_result, action
endfor

This still sucks and I'm not sure that
this is what you're looking for.
Instead of exec you could be using call('functionname',...)

If you have to do real programming use one of the many :h if_tab
implementations.

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: standard ubuntu lucid vim package is not +multibyte

2011-04-20 Thread Adam Monsen
 +multibyte

Just a small nit: this should be +multi_byte.

And there is no standard lucid vim package of Vim 7.3. Looks like
only natty has Vim 7.3.

See: http://packages.ubuntu.com/search?keywords=vim

Looks like there is a backport in progress:
https://bugs.launchpad.net/lucid-backports/+bug/661218

You can probably snag packages from the PPA mentioned in that bug:
https://launchpad.net/~passy/+archive/vim?field.series_filter=maverick

I forget the syntax, something like
$ sudo add-apt-repository ppa:passy/vim
$ sudo apt-get install vim-common

(but that didn't work for me)

-- 
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: Vimscript Question

2011-04-20 Thread Ben Fritz


On Apr 20, 2:25 pm, niva nivaem...@gmail.com wrote:
 Hi,

 I am writing a vimscript that contains recursivecondition block.


What is a recursive condition block?

Are you just looking for elseif?

-- 
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: Vimscript Question

2011-04-20 Thread Tim Chase

On 04/20/2011 06:15 PM, Marc Weber wrote:

let conditions = [['a=7','echo 7'],['a=8','echo 8']]

for [c,action] in conditions
   exec 'let c_result = '.action
   if c_result
 exec action


I think, to mimic the OP's structure, you need a break in here


   endif
   unlet c, c_result, action
endfor


-tim

--
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: problems with using gundo

2011-04-20 Thread Ben Fritz


On Apr 20, 9:53 am, zidar zidar...@gmail.com wrote:
 Hello,

 I have just started using vim, and I would really like give it a fair
 chance, since it sounds like an awesome editor.
 First thing i did was install python syntax highlighting, witch looked
 really nice.

 Then i tried installing gundo, and here is where my problems started.
 First thing i saw was:
 install details
 Use Pathogen.

 No, seriously.


I agree this is a terrible installation instruction. And I don't use
pathogen, I use Vim plugins the way they were originally set up.

Not having used Pathogen, I don't know how to work installation using
it. If you get rid of Pathogen, to install *any* global plugin like
gundo, just put the .vim file into a (possibly new) ~/.vim/plugin
directory. That's all you need to do to use the plugin.

Some other plugins also require stuff to be copied into autoload or
ftplugin or similar, however most of them will show you the
directories needed, just like gundo does in the .zip file. The common
thread is that they all go under ~/.vim.

There is technically one more step for a full gundo installation. To
install the help file, copy it into ~/.vim/doc, go into Vim, and run
the command :helptags ~/.vim/doc

That's it. Details within Vim, at :help plugin

-- 
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: editing vim help files

2011-04-20 Thread Tim Chase

On 04/20/2011 04:12 PM, Adam Monsen wrote:

Anyone handy with editing help files? I'm wondering how to align a
title and tag, ala

SPONSOR VIM DEVELOPMENT *sponsor*

where the title is left-aligned and the tag right-aligned, on the
same line.


While I don't know what other folks use, and I don't do it 
myself, this one-liner can be made into a :command! or mapped to 
make it pretty easy/straight-forward:


:%s/^\(.*\)\\s*\(\*[^*]*\*\)$/\=printf('%s%*s', submatch(1), 
(tw?tw:80)-(strlen(submatch(1))), submatch(2))



It should be smart enough to adjust to your 'textwidth' setting, 
defaulting to 80 if it's unset (=0)


You may also have to tweak the search regexp so that the right 
things get captured, but it should handle most generic cases.


-tim




--
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: problems with using gundo

2011-04-20 Thread Taylor Hedberg
Ben Fritz, Wed 2011-04-20 @ 17:26:49-0700:
 Not having used Pathogen, I don't know how to work installation using
 it.

Pathogen creates a new directory bundle/ underneath your .vim/
directory. You then place the entire directory structure for a plugin in
a subdirectory of bundle. For example:

.vim/
bundle/
pluginFoo/
plugin/
autoload/
syntax/
doc/
pluginBar/
plugin/
autoload/
doc/

The point is to prevent files from multiple plugins from being mixed
together in the standard directory structure. This makes them much
easier to upgrade or remove in the future.

Other than putting plugins into the bundle/ directory, you have to add
one line to your .vimrc so the bundles get loaded at startup. That's all
there is to it.

-- 
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: standard ubuntu lucid vim package is not +multibyte

2011-04-20 Thread pansz
On Wed, Apr 20, 2011 at 7:04 PM, Eric Smith e...@fruitcom.com wrote:
 Why is this and how do I without having to compile, get back the
 mutibyte vim that I know and love in 7.3?
 --
 - Eric Smith

The standard vim packged with Ubuntu Lucid DO have +multibyte.

Just make sure you do really have sudo apt-get install vim , no, the
standard vim is NOT installed by default, ubuntu comes with a
non-standard vim.

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