A mile of dashes added to foldtext

2011-08-01 Thread Erik Christiansen
After collecting several dozen informative posts on the topic, I'm trying out folding on a 20k+ line file, starting out with a single level of folds, using just this in .vimrc: " Folding: set foldmethod=marker set foldtext=substitute(getline(v:foldstart),'/\\*\\\|\\*/\\\|{{{\\d\\=','','g') hi! lin

Re: sh vs bash syntax coloring

2011-08-01 Thread ranousse
On 31/07 13:10, Gary Johnson wrote: > I'm not sure I understand the problem. If you write your shell > scripts with > > #!/bin/bash > > as the first line, they will be executed by bash, regardless of the > shell they were started from. My problem with #!/bin/bash and #!/bin/sh is solved. A

Re: Detecting Encrypted File

2011-08-01 Thread Paul
On Mon, Aug 01, 2011 at 09:40:27AM +1000, Ben Schmidt wrote: BufReadPost should also work, and won't trigger every time you move the cursor into the encrypted file's window/buffer. I agree, it should work... but neither of these do: au! BufReadPost * if !empty(&key) | set viminfo= | endif

Re: A mile of dashes added to foldtext

2011-08-01 Thread Paul
On Mon, Aug 01, 2011 at 06:15:38PM +1000, Erik Christiansen wrote: Everything works like a bought one, straight OOTB ... except that closed folds have a spurious second long string of dashes appearing to the right of my headings, running out to nearly twice the 80 character page width. (I can't s

Vim Spelling dictionary (OED)

2011-08-01 Thread Nicholas Cole
Dear List, I'd like to generate and use a British English dictionary using OED spellings (which are different from the usual en_gb spellings, but essential for some academic work). I've tried doing the following: There is a source list at http://en-gb.pyxidium.co.uk/dictionary/OOo.php I've trie

Re: Vim Spelling dictionary (OED)

2011-08-01 Thread Nicholas Cole
On Mon, Aug 1, 2011 at 10:46 AM, Nicholas Cole wrote: > mkspell! ~/.vim/oed ~/Downloads/en-GB-oed-wlist.txt Gah. I got the path wrong! It should have been ~/.vim/spell/oed It's the simple errors that catch you out, sometimes. N -- You received this message from the "vim_use" maillist. Do not

Re: Manu missing: Ubuntu 11.04

2011-08-01 Thread John Little
> After installing afresh Ubuntu (version 11.04) gvim displays menus > only if I run it as root (superuser). If I run it as normal user I > find no way of displaying menus. That sounds like you have some configuration or customization file that you can't read. I suggest checking the accessibilit

Moving a fold? [Was: A mile of dashes added to foldtext]

2011-08-01 Thread Erik Christiansen
On 01.08.11 10:38, Paul wrote: > On Mon, Aug 01, 2011 at 06:15:38PM +1000, Erik Christiansen wrote: > >But how to remove the extra "- ... --" hoo-haa? > > Try setting 'fold:' in fillchars, eg. set fillchars="fold: " Paul, you're a wizard. :-) Many thanks for that magical

Re: A mile of dashes added to foldtext

2011-08-01 Thread Benjamin R. Haskell
On Mon, 1 Aug 2011, Erik Christiansen wrote: set foldtext=substitute(getline(v:foldstart),'/\\*\\\|\\*/\\\|{{{\\d\\=','','g') [}}}] [...] let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g') [}}}] [...] It has also become clear that I'll have to constrain the folding with some "au BufN

Re: sh vs bash syntax coloring

2011-08-01 Thread ZyX
Reply to message «Re: sh vs bash syntax coloring», sent 12:31:16 01 August 2011, Monday by ranou...@gmx.com: > In the first case > I would like like that :!shell_cmd is runed with bash. > (In fact the main reason is that sometimes I write things like > > :!action="xpdf -option"; ...; $action fil

Re: Detecting Encrypted File

2011-08-01 Thread ZyX
Reply to message «Re: Detecting Encrypted File», sent 13:35:05 01 August 2011, Monday by Paul: > I agree, it should work... but neither of these do: > > au! BufReadPost * if !empty(&key) | set viminfo= | endif > au! BufRead * if !empty(&key) | set viminfo= | endif BufRead and BufRe

Overcoming unintended folding [Was: A mile of dashes added to foldtext]

2011-08-01 Thread Erik Christiansen
On 01.08.11 08:29, Benjamin R. Haskell wrote: > On Mon, 1 Aug 2011, Erik Christiansen wrote: > > > >It has also become clear that I'll have to constrain the folding > >with some "au BufNewFile,BufRead", because .vimrc is only partly > >displayed, apparently due to the foldtext regex being interpret

Re: sh vs bash syntax coloring

2011-08-01 Thread ranousse
> You can put this option somewher in ~/.zshenv. Or, better, use zsh syntax for > it: > !action=(xpdf -option) ; ... ; $action file > !action="xpdf -option" ; ... ; ${(z)action} file > !action="xpdf -option" ; ... ; $=action file > in last case it is just one more character to type, in

Re: sh vs bash syntax coloring

2011-08-01 Thread Benjamin R. Haskell
On Sun, 31 Jul 2011, Thilo Six wrote: ranou...@gmx.com wrote the following on 31.07.2011 12:42 Hello I'm not very happy with syntax coloring of sh scripts (starting with #!/bin/sh). For example, things like $(command), $((n+1)) or ${var%.txt} are very badly displayed. However they are part

Re: sh vs bash syntax coloring

2011-08-01 Thread Charles Campbell
ranou...@gmx.com wrote: On 31/07 13:49, Thilo Six wrote: ,[ :h ft-sh-syntax ]-- let g:is_bash = 1 `- So there is no trick at all, I only have to choose the right option. Thank you very much.

Re: sh vs bash syntax coloring

2011-08-01 Thread Thilo Six
Charles Campbell wrote the following on 01.08.2011 18:17 Hello Charles, I think here is a typo: -- -- > Just to be complete, please read :help ft-syntax-sh (g:is_bash is ^ `- s:ft-syntax-sh:ft-sh-syntax: ':help ft-sy

Re: netrw dir listing position

2011-08-01 Thread Steffen Prohaska
On Jul 30, 5:12 pm, Charles E Campbell Jr wrote: > Charles E Campbell Jr wrote: > > > Sigma wrote: > > >> Is there a way to make thenetrwdirlistingmaintain > >> the cursorposition? > > >> For example if I do a dirlistingon a big dir, scroll down, and > >> press enter to edit a file, when I go bac

Re: sh vs bash syntax coloring

2011-08-01 Thread Leiking
zsh. 2011/8/1 : >> You can put this option somewher in ~/.zshenv. Or, better, use zsh syntax for >> it: >>     !action=(xpdf -option) ; ... ; $action file >>     !action="xpdf -option" ; ... ; ${(z)action} file >>     !action="xpdf -option" ; ... ; $=action file >> in last case it is just one mor

Re: sh vs bash syntax coloring

2011-08-01 Thread ZyX
Reply to message «Re: sh vs bash syntax coloring», sent 18:28:38 01 August 2011, Monday by Leiking: > zsh. ? Original message: > zsh. > > 2011/8/1 : > >> You can put this option somewher in ~/.zshenv. Or, better, use zsh > >> syntax for it: > >> !action=(xpdf -option) ; ... ; $action file

Re: sh vs bash syntax coloring

2011-08-01 Thread Charles Campbell
Thilo Six wrote: Charles Campbell wrote the following on 01.08.2011 18:17 Hello Charles, I think here is a typo: -- -- Just to be complete, please read :help ft-syntax-sh (g:is_bash is ^ `- s:ft-synta

Re: netrw dir listing position

2011-08-01 Thread Charles Campbell
Bram Moolenaar wrote: Charles E Campbell Jr wrote: Hi, Is there a way to make the netrw dir listing maintain the cursor position? For example if I do a dir listing on a big dir, scroll down, and press enter to edit a file, when I go back to the dir listing the cursor is no longer at the fi

Re: sh vs bash syntax coloring

2011-08-01 Thread Benjamin R. Haskell
On Mon, 1 Aug 2011, Simon Nicolussi wrote: Benjamin R. Haskell wrote: That solves the problem since the OP wants bash syntax. I don't. Is there a reason the constructs mentioned aren't included in "plain 'sh'" mode? Not all shells support command substitution via $(...), even though it is

Re: sh vs bash syntax coloring

2011-08-01 Thread Simon Nicolussi
Benjamin R. Haskell wrote: > That solves the problem since the OP wants bash syntax. I don't. > Is there a reason the constructs mentioned aren't included in "plain > 'sh'" mode? Not all shells support command substitution via $(...), even though it is required by POSIX. The /bin/sh in Solaris co

Re: Moving a fold? [Was: A mile of dashes added to foldtext]

2011-08-01 Thread Ben Fritz
On Aug 1, 6:40 am, Erik Christiansen wrote: > Vim's help has a number of fold-related commands, but I'm having trouble > finding a command to delete a fold, for pasting elsewhere. So not zd, >         --- > which just negates the fold. (The perspective provided by folding

swap files reverting my work erroneously

2011-08-01 Thread David Ohlemacher
I have noticed several times that swap files are created and remain after exiting vim properly. When I start vim again later, I have been manually allowing the recover. I was assuming that what is in the swap file was the same as in the buffer when I last exited. It took me a bit to figure ou

Re: swap files reverting my work erroneously

2011-08-01 Thread Paul
The swap file stays around when vim crashes, for example. When it asks you if you want to recover, note that it also warns you to check the file and manually remove the swap file. It won't remove it for you. If you don't remove it, vim will detect it every time you open the file, and ask you to

Re: Manu missing: Ubuntu 11.04

2011-08-01 Thread Guido Milanese
On 1 Aug, 12:55, John Little wrote: > > After installing afresh Ubuntu (version 11.04) gvim displays menus > > only if I run it as root (superuser). If I run it as normal user I > > find no way of displaying menus. > > That sounds like you have some configuration or customization file > that you c

Re: swap files reverting my work erroneously

2011-08-01 Thread David Ohlemacher
So once you have a swap file from a crash its there forever. That is until you delete the swp manually. And if you hit recover, your _newer_ file contents will be wiped out by an _older_ swap file's contents? I assumed (word chosen carefully), that once you've recovered from a swap file, t

Re: swap files reverting my work erroneously

2011-08-01 Thread Gary Johnson
On 2011-08-01, David Ohlemacher wrote: > So once you have a swap file from a crash its there forever. That is until > you delete the swp manually. And if you hit recover, your newer file > contents > will be wiped out by an older swap file's contents? It would be more correct to say that if y

Re: swap files reverting my work erroneously

2011-08-01 Thread Tony Mechelynck
On 02/08/11 01:50, David Ohlemacher wrote: So once you have a swap file from a crash its there forever. That is until you delete the swp manually. And if you hit recover, your _newer_ file contents will be wiped out by an _older_ swap file's contents? I assumed (word chosen carefully), that once

Re: swap files reverting my work erroneously

2011-08-01 Thread ZyX
Reply to message «Re: swap files reverting my work erroneously», sent 04:27:35 02 August 2011, Tuesday by Gary Johnson: > will tell you that it has found a swap file, etc. Regardless of you > choice, Vim will use a new swap file for the current buffer, named > .foo.swo. That file will be delete

Re: swap files reverting my work erroneously

2011-08-01 Thread Gary Johnson
On 2011-08-02, ZyX wrote: > Reply to message «Re: swap files reverting my work erroneously», > sent 04:27:35 02 August 2011, Tuesday > by Gary Johnson: > > > will tell you that it has found a swap file, etc. Regardless of you > > choice, Vim will use a new swap file for the current buffer, named

Re: swap files reverting my work erroneously

2011-08-01 Thread ZyX
Reply to message «Re: swap files reverting my work erroneously», sent 08:20:31 02 August 2011, Tuesday by Gary Johnson: > The trouble with > continually saving, though, is that you lose your reference for the > changes you've made to the file since you started editing. That's > not always import

Re: swap files reverting my work erroneously

2011-08-01 Thread Tony Mechelynck
On 02/08/11 06:38, ZyX wrote: Reply to message «Re: swap files reverting my work erroneously», sent 08:20:31 02 August 2011, Tuesday by Gary Johnson: The trouble with continually saving, though, is that you lose your reference for the changes you've made to the file since you started editing.

Re: swap files reverting my work erroneously

2011-08-01 Thread Christian Brabandt
Hi Gary! On Mo, 01 Aug 2011, Gary Johnson wrote: > don't put your swap files elsewhere). If you open foo again, Vim > will tell you that it has found a swap file, etc. Regardless of you > choice, Vim will use a new swap file for the current buffer, named > .foo.swo. That file will be deleted a

Re: swap files reverting my work erroneously

2011-08-01 Thread Christian Brabandt
Hi ZyX! On Di, 02 Aug 2011, ZyX wrote: > by Gary Johnson: > > The trouble with > > continually saving, though, is that you lose your reference for the > > changes you've made to the file since you started editing. That's > > not always important, but sometimes it's very handy. And having > > sw

split view with context

2011-08-01 Thread sinbad
i generally use vi for c code browsing. i've observed that at any time half of my screen is not used. so is it possible to split the screen vertically in to two and in the second window display the next-page contents (with some context). this would help me to see two pages at once. the real trick i

Re: split view with context

2011-08-01 Thread Christian Brabandt
Hi sinbad! On Mo, 01 Aug 2011, sinbad wrote: > i generally use vi for c code browsing. i've observed that > at any time half of my screen is not used. so is it possible > to split the screen vertically in to two and in the second > window display the next-page contents (with some context). > this