Re: Pre-fold output of :r! command

2021-07-06 Thread Tim Chase
On 2021-07-06 17:59, Julius Hamilton wrote: > If I unfold that fold, I think the fold disappears. I then have to > respecify the content to be folded. Or if not, I still have to put > my cursor on the top line of the fold, to re-fold it. Unless you delete the fold, it should remain even

Re: Pre-fold output of :r! command

2021-07-06 Thread Julius Hamilton
Thanks very much. That works perfectly. One tiny tweak is I would just like to be able to collapse and open a fold back and forth with ease. If I unfold that fold, I think the fold disappears. I then have to respecify the content to be folded. Or if not, I still have to put my cursor on the top

Re: Pre-fold output of :r! command

2021-07-05 Thread Christian Brabandt
e: > > :r! w3m -dump url.com FOLD > > How would this be possible? Perhaps like this: :exe ":r! w3m -dump url" |'[,']fold Unfortunately the `|` is seen as an argument to the :r! command, that's why we have to wrap it in an `:exe "..." call and can separate t

Re: Pre-fold output of :r! command

2021-07-05 Thread Ailen Vienne Sebastian
e command would look something like: > > :r! w3m -dump url.com FOLD > > How would this be possible? > > I would like to navigate my folds in an easier way than navigating to the > blue line that appears, and unfolding them. Is it possible to get some kind > of table of conte

Re: Pre-fold output of :r! command

2021-07-04 Thread 'Suresh Govindachar' via vim_use
<http://url.com> FOLD How would this be possible? Tested the following for being dir: exec(':r !') |normal zM I would like to navigate my folds in an easier way than navigating to the blue line that appears, and unfolding them. Is it possible to get some kind of table of contents s

Pre-fold output of :r! command

2021-07-04 Thread Julius Hamilton
I would like to print the output of a shell command - a webpage dump - into a Vim buffer, and have those lines immediately folded, rather than a second step of selecting and folding them. The command would look something like: :r! w3m -dump url.com FOLD How would this be possible? I would like

Re: How to let previous opened fold open reentering vim buffer.

2019-10-10 Thread Ni Va
This code well do the calling of func AvoidFolding when entering buffer but it returns E490 no fold found. fun! AvoidFolding() normal! zx normal! zv normal! za endfunction if has("autocmd") " augroup vimrc au! " Avoid folding autocmd BufEnter *.vim :call Av

Re: How to let previous opened fold open reentering vim buffer.

2019-10-02 Thread Ni Va
Seems to not working.. It's disturbing that previsou opened fold is closed just when leaving and re entering the same buffer. Le mercredi 2 octobre 2019 13:12:17 UTC+2, Enno a écrit : > > The command `za` toggles the fold. Try instead > > silent autocmd! BufEnter *.vim normal! zv

Re: How to let previous opened fold open reentering vim buffer.

2019-10-02 Thread Enno
The command `za` toggles the fold. Try instead silent autocmd! BufEnter *.vim normal! zv to open sufficiently many folds to show the line where the cursor is at. Le vendredi 27 septembre 2019 12:58:23 UTC-3, Ni Va a écrit : > > Hi, > > > I try this in _vimrc in order to let a

How to let previous opened fold open reentering vim buffer.

2019-09-27 Thread Ni Va
Hi, I try this in _vimrc in order to let a previous opened fold, opened when I re enter buffer. in _vimrc: > if has("autocmd") > silent autocmd! BufEnter *.vim norm za > endif example of vim buffer : function! sequencerutil#echomsg(startreltime,str) abort " times

Placing fold markers above comments above declarations

2019-01-10 Thread BPJ
I have a perl file with several instances of a variable number of comment lines, followed by a subroutine or variable declaration in the leftmost column with a comment with a fold marker on the same line as the declaration: # comment here # maybe more comment here sub subname { #{{{1

Sort folds by a line within the fold

2018-11-03 Thread Philip Rhoades
People, Bookmarks managers never do everything I want them to do - if I have lots of blocks like this stacked: { "date_added": "13185720896096372", "id": "4", "meta_info": { "Thumbnail":

Re: Open fold when using vim +N file.ext

2018-04-01 Thread David Woodfall
On Sunday 1 April 2018 13:19, Christian Brabandt put forth the proposition: On Fr, 30 Mär 2018, David Woodfall wrote: I'm using an autocmd to unfold lines under the cursor when I open a file: autocmd BufReadPost * normal zv But it doesn't work when opening a file via a

Re: Open fold when using vim +N file.ext

2018-04-01 Thread Christian Brabandt
On Fr, 30 Mär 2018, David Woodfall wrote: > I'm using an autocmd to unfold lines under the cursor when I open a > file: > > autocmd BufReadPost * normal zv > > But it doesn't work when opening a file via a line number (vim +N). Is > there a way to get that to work? Have you tried `:autocmd

Re: Open fold when using vim +N file.ext

2018-03-30 Thread David Woodfall
On Friday 30 March 2018 16:32, Dave Woodfall put forth the proposition: I'm using an autocmd to unfold lines under the cursor when I open a file: autocmd BufReadPost * normal zv But it doesn't work when opening a file via a line number (vim +N). Is there a way to get that

Open fold when using vim +N file.ext

2018-03-30 Thread David Woodfall
I'm using an autocmd to unfold lines under the cursor when I open a file: autocmd BufReadPost * normal zv But it doesn't work when opening a file via a line number (vim +N). Is there a way to get that to work? My foldopen is: block,hor,mark,percent,quickfix,search,tag,undo,jump -- -- You

Re: fold-expr

2017-06-06 Thread Ni Va
; bar > END_FUNCTION > > > > > I don't happen to foldlevel 1 FUNC END_FUNC and foldlevel 2 NETWORK section. > > > I just happen to fold all in foldlevel one with this script : > > " folding > setlocal foldmethod=expr > setlocal foldexpr=GetFold(v:lnum)

fold-expr

2017-06-06 Thread Ni Va
Hi, With this kind of syntax: FUNCTION NETWORK foobar barfo foo bar NETWORK foobar barfo foo bar NETWORK foobar barfo foo bar END_FUNCTION I don't happen to foldlevel 1 FUNC END_FUNC and foldlevel 2 NETWORK section. I just happen to fold all in foldlevel one with this script

Re: cpp and golang code fold problem

2017-03-29 Thread YZ Xie
Hi Christian, thanks, you're right, fdm was different when file postfix was different, *.cc was syntax, *.cpp was manual, so I need to check my .vimrc. but I have set fdm to syntax, it's strange. Best YZ 2017-03-30 2:12 GMT+08:00 Christian Brabandt : > Hi YZ! > > In both

Re: cpp and golang code fold problem

2017-03-29 Thread Christian Brabandt
Hi YZ! In both cases please check the output of `:verbose set fdm? fen?` Best, 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 --- You

Re: cpp and golang code fold problem

2017-03-29 Thread Charles E Campbell
YZ Xie wrote: > Hi everyone, > > my .vimrc was > set foldmethod=syntax > filetype plugin indent on " Automatically detect file types. > syntax enable > syntax on > > but it cannot fold code if file was named like *.cpp, but it can work >

vim cannot fold cpp and golang code

2017-03-29 Thread YZ Xie
vim cannot fold test.cpp, vim prompts E490 no fold found, but rename this file to test.c or test.cc, vim can use zc to fold this same code. I have set configure in .vimrc foldmethod=syntax set foldlevel=0 set foldnestmax=2 VIMRUNTIME=/usr/share/vim/vim80 in /usr/share/vim/vim80/ftplugin

Re: cpp and golang code fold problem

2017-03-28 Thread YZ Xie
在 2017年3月29日星期三 UTC+8下午1:16:40,YZ Xie写道: > Hi everyone, > > > my .vimrc was  > set foldmethod=syntax  > filetype plugin indent on   " Automatically detect file types. > syntax enable >  syntax on   >                   > but  it cannot fold code if file was nam

cpp and golang code fold problem

2017-03-28 Thread YZ Xie
Hi everyone, my .vimrc was set foldmethod=syntax filetype plugin indent on " Automatically detect file types. syntax enable syntax on but it cannot fold code if file was named like *.cpp, but it can work well if file was name *.c or *.cc. golang code failed too. my vim was inst

Re: "No fold found" on many C functions

2017-03-20 Thread Charles E Campbell
Andrew Pennebaker wrote: > When I try to zc C functions, Vim often complains "No fold found" > > Example project: > > https://github.com/edenhill/librdkafka > There's a lot of code in there. Care to point one file out in particular? I just tried rdavi.c and it fold

"No fold found" on many C functions

2017-03-17 Thread Andrew Pennebaker
When I try to zc C functions, Vim often complains "No fold found" Example project: https://github.com/edenhill/librdkafka -- -- 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 inf

Re: How to fold or hide the comment in vimrc file?

2016-12-22 Thread Zhe Lee
03:00 Zhe Lee > > > > > I want to fold or hide the comment in the vimrc file. > > > > > I Google it and find mainly the 2 solution below but none of them > > > > > worked. > > > > > > > > > > > > > &

Re: How to fold or hide the comment in vimrc file?

2016-12-19 Thread Gary Johnson
On 2016-12-19, Zhe Lee wrote: > On Friday, December 16, 2016 at 10:42:07 PM UTC+8, Gary Johnson wrote: > > On 2016-12-16, Nikolay Aleksandrovich Pavlov wrote: > > > 2016-12-16 5:41 GMT+03:00 Zhe Lee > > > > I want to fold or hide the comment in the vimrc file. >

Re: How to fold or hide the comment in vimrc file?

2016-12-19 Thread Zhe Lee
On Friday, December 16, 2016 at 12:28:20 PM UTC+8, ZyX wrote: > 2016-12-16 5:41 GMT+03:00 Zhe Lee <imlegend...@gmail.com>: > > I want to fold or hide the comment in the vimrc file. > > I Google it and find mainly the 2 solution below but none of them worked. > > > &

Re: How to fold or hide the comment in vimrc file?

2016-12-19 Thread Zhe Lee
On Friday, December 16, 2016 at 12:28:20 PM UTC+8, ZyX wrote: > 2016-12-16 5:41 GMT+03:00 Zhe Lee <imlegend...@gmail.com>: > > I want to fold or hide the comment in the vimrc file. > > I Google it and find mainly the 2 solution below but none of them worked. > > > &

Re: How to fold or hide the comment in vimrc file?

2016-12-19 Thread Zhe Lee
On Friday, December 16, 2016 at 10:42:07 PM UTC+8, Gary Johnson wrote: > On 2016-12-16, Nikolay Aleksandrovich Pavlov wrote: > > 2016-12-16 5:41 GMT+03:00 Zhe Lee > > > I want to fold or hide the comment in the vimrc file. > > > I Google it and find mainly the 2 solu

Re: Fold-related bug and pointer to fix

2016-12-19 Thread Efraim Yawitz
On Fri, Dec 16, 2016 at 12:58 PM, Christian Brabandt wrote: > Bram, > attached is a patch, that changes slightly how addresses are being > calculated when on a folded line and using an relative offset. > > I couldn't manage to run the patch. patch -p0 gave me errors. What am

Re: How to fold or hide the comment in vimrc file?

2016-12-16 Thread Nikolay Aleksandrovich Pavlov
2016-12-16 17:43 GMT+03:00 Gary Johnson <garyj...@spocom.com>: > On 2016-12-16, Nikolay Aleksandrovich Pavlov wrote: >> 2016-12-16 5:41 GMT+03:00 Zhe Lee >> > I want to fold or hide the comment in the vimrc file. >> > I Google it and find mainly the 2 solut

Re: How to fold or hide the comment in vimrc file?

2016-12-16 Thread Gary Johnson
On 2016-12-16, Nikolay Aleksandrovich Pavlov wrote: > 2016-12-16 5:41 GMT+03:00 Zhe Lee > > I want to fold or hide the comment in the vimrc file. > > I Google it and find mainly the 2 solution below but none of them worked. > > > > > > syn match comment &

Re: Fold-related bug and pointer to fix

2016-12-16 Thread Bram Moolenaar
Christian Brabandt wrote: > Bram, > attached is a patch, that changes slightly how addresses are being > calculated when on a folded line and using an relative offset. Thanks! I'm afraid the list of patches to include is getting longer, and I don't have much time, thus it might take a while.

Re: Fold-related bug and pointer to fix

2016-12-16 Thread Christian Brabandt
016 19:10:47 +0100 Subject: [PATCH] Correct ex range for folded lines This will make :.,+3y work as expected for lines that are folded away e.g. it will adjust the second adress to included the complete fold (until the end of the folded lines) + 2 separate lines. --- src/ex_docmd.c| 28

Re: How to fold or hide the comment in vimrc file?

2016-12-15 Thread Nikolay Aleksandrovich Pavlov
2016-12-16 5:41 GMT+03:00 Zhe Lee <imlegend...@gmail.com>: > I want to fold or hide the comment in the vimrc file. > I Google it and find mainly the 2 solution below but none of them worked. > > > syn match comment "\v(^\s*\".*\n)+" fold > > set fold

How to fold or hide the comment in vimrc file?

2016-12-15 Thread Zhe Lee
I want to fold or hide the comment in the vimrc file. I Google it and find mainly the 2 solution below but none of them worked. syn match comment "\v(^\s*\".*\n)+" fold set foldmethod=expr foldexpr=getline(v:lnum)=~'^\s*"' My Vimrc file is like this, when I enter

Re: Fold-related bug and pointer to fix

2016-12-14 Thread Christian Brabandt
Am 2016-12-14 15:35, schrieb Efraim Yawitz: On Wed, Dec 14, 2016 at 7:26 AM, Ben Fritz wrote: On Tuesday, December 13, 2016 at 6:37:54 AM UTC-6, Efraim Yawitz wrote: Has any fix been made for this? I'm not subscribed to vim_dev, and there are a lot of messages to

Re: Fold-related bug and pointer to fix

2016-12-14 Thread Efraim Yawitz
On Wed, Dec 14, 2016 at 7:26 AM, Ben Fritz wrote: > On Tuesday, December 13, 2016 at 6:37:54 AM UTC-6, Efraim Yawitz wrote: > > Has any fix been made for this? I'm not subscribed to vim_dev, and > there are a lot of messages to look through in the archives. > > > >

Re: Fold-related bug and pointer to fix

2016-12-13 Thread Ben Fritz
On Tuesday, December 13, 2016 at 6:37:54 AM UTC-6, Efraim Yawitz wrote: > Has any fix been made for this?  I'm not subscribed to vim_dev, and there are > a lot of messages to look through in the archives. > > Thanks, > > Ephraim > > I don't see it in the todo list nor do I see it in the

Re: Fold-related bug and pointer to fix

2016-12-13 Thread Efraim Yawitz
im Yawitz wrote: > > I had the following problem and I think it is a bug in some fold-related > code: > > > > I was trying to use the NarrowRegion plugin to do diffs between two > functions in the same file by creating narrowed buffers for each function > and calling :d

Re: Fold-related bug and pointer to fix

2016-11-29 Thread Efraim Yawitz
On Tue, Nov 29, 2016 at 7:02 PM, Ben Fritz <fritzophre...@gmail.com> wrote: > On Wednesday, November 23, 2016 at 4:39:24 AM UTC-6, Efraim Yawitz wrote: > > I had the following problem and I think it is a bug in some fold-related > code: > > > > I was trying to use

Re: Fold-related bug and pointer to fix

2016-11-29 Thread Ben Fritz
On Wednesday, November 23, 2016 at 4:39:24 AM UTC-6, Efraim Yawitz wrote: > I had the following problem and I think it is a bug in some fold-related code: > > I was trying to use the NarrowRegion plugin to do diffs between two functions > in the same file by creating narrowed buff

Fold-related bug and pointer to fix

2016-11-23 Thread Efraim Yawitz
I had the following problem and I think it is a bug in some fold-related code: I was trying to use the NarrowRegion plugin to do diffs between two functions in the same file by creating narrowed buffers for each function and calling :diffthis on them. When I tried to do this using folds, i.e

Re: Open fold above current line in diff mode

2015-11-29 Thread Ben Fritz
On Saturday, November 28, 2015 at 3:56:25 PM UTC-6, Bram Moolenaar wrote: > Ben Fritz wrote: > > > Diff mode folds huge swaths of a file a lot of the time. So when I > > want to view some context around a diff, it is very inconvenient to > > place the cursor on the

Re: Open fold above current line in diff mode

2015-11-28 Thread Bram Moolenaar
Ben Fritz wrote: > Diff mode folds huge swaths of a file a lot of the time. So when I > want to view some context around a diff, it is very inconvenient to > place the cursor on the fold and use zo, because then the spot I was > looking at jumps off-screen. > > So I can do :

Open fold above current line in diff mode

2015-11-24 Thread Ben Fritz
Diff mode folds huge swaths of a file a lot of the time. So when I want to view some context around a diff, it is very inconvenient to place the cursor on the fold and use zo, because then the spot I was looking at jumps off-screen. So I can do :-1foldopen with my cursor *below* the fold

Re: 3zo should open fold upto depth of 3

2015-03-18 Thread Paul
esquifit esquifit at googlemail.com writes: |On Tuesday, March 17, 2015 at 10:08:44 PM UTC+2, Paul wrote: | According to the documentation for folds, the command 3zo should | open folds to a depth of 3. When I move the cursor to a top-level | fold and enter 3zo, it's as if I only entered zo, i.e

Re: 3zo should open fold upto depth of 3

2015-03-18 Thread Vlad Irnov
On 3/18/15, Vlad Irnov vlad.ir...@gmail.com wrote: ... To open/close nested folds as well, one can use zO, zC, zA. Since zC also closes folds that start above the cursor and thus can hide the cursor, follow it with zv. This is wrong. Normal mode zC/zA do not close nested folds that do not

Re: 3zo should open fold upto depth of 3

2015-03-18 Thread Vlad Irnov
| fold and enter 3zo, it's as if I only entered zo, i.e. only the top | level fold opens. I have foldmethod=indent. There are in fact | subfolds at levels 2 and 3 within the top level fold. | | Can anyone corroborate this behaviour? Am I misinterpretting the | help? How can I get the effect I

Re: 3zo should open fold upto depth of 3

2015-03-18 Thread esquifit
On Tuesday, March 17, 2015 at 10:08:44 PM UTC+2, Paul wrote: According to the documentation for folds, the command 3zo should open folds to a depth of 3. When I move the cursor to a top-level fold and enter 3zo, it's as if I only entered zo, i.e. only the top level fold opens. I have

Is there a movement to the start of the enclosing fold?

2015-03-17 Thread Erik Christiansen
If I'm in a leaf fold, then ?{{{ will take me back to the start of the fold¹, to discover its title. That's sometimes very useful when I've landed more than a page within it via a search. But if there are several (even closed) subordinate folds between, then ?{{{ won't do the job. I suppose

Re: Is there a movement to the start of the enclosing fold?

2015-03-17 Thread Erik Christiansen
On 17.03.15 11:11, Jürgen Krämer wrote: Hi, Erik Christiansen schrieb am 17.03.2015 um 10:51: If I'm in a leaf fold, then ?{{{ will take me back to the start of the fold¹, to discover its title. That's sometimes very useful when I've landed more than a page within it via a search

Re: Is there a movement to the start of the enclosing fold?

2015-03-17 Thread Jürgen Krämer
Hi, Erik Christiansen schrieb am 17.03.2015 um 10:51: If I'm in a leaf fold, then ?{{{ will take me back to the start of the fold¹, to discover its title. That's sometimes very useful when I've landed more than a page within it via a search. But if there are several (even closed

3zo should open fold upto depth of 3

2015-03-17 Thread Paul
According to the documentation for folds, the command 3zo should open folds to a depth of 3. When I move the cursor to a top-level fold and enter 3zo, it's as if I only entered zo, i.e. only the top level fold opens. I have foldmethod=indent. There are in fact subfolds at levels 2 and 3 within

Re: Can someone recommend a plugin to fold python long dict spanning over many lines?

2015-02-11 Thread Ben Fritz
On Wednesday, February 11, 2015 at 12:52:12 AM UTC-6, Bao Niu wrote: No, sorry for this abrupt assertion but indentation is no good in this case. That's why there are many plugins based on expr. Folding is simply too rigid for this job. I just want to write a wrapper function to fold those

Re: Can someone recommend a plugin to fold python long dict spanning over many lines?

2015-02-11 Thread Nikolay Pavlov
for this job. I just want to write a wrapper function to fold those long ducts. Any thoughts? Sorry for my blunder earlier, I'll try to make it up. It looks like Python does not provide syntax folding. As Tim suggests, indent folding is normally recommended since Python indentation is semantic

Re: Can someone recommend a plugin to fold python long dict spanning over many lines?

2015-02-10 Thread Ben Fritz
On Monday, February 9, 2015 at 10:37:33 PM UTC-6, Bao Niu wrote: I'm looking for a plugin in that can fold something like this: config = { '/': { 'tools.db.on': True }, /UI_JS: { tools.staticdir.on: True, tools.staticdir.root: os.path.abspath

Re: Can someone recommend a plugin to fold python long dict spanning over many lines?

2015-02-10 Thread Tim Chase
On 2015-02-10 09:57, Ben Fritz wrote: On Monday, February 9, 2015 at 10:37:33 PM UTC-6, Bao Niu wrote: I'm looking for a plugin in that can fold something like this: config = { '/': { 'tools.db.on': True }, /UI_JS: { tools.staticdir.on: True

Re: Can someone recommend a plugin to fold python long dict spanning over many lines?

2015-02-10 Thread Bao Niu
No, sorry for this abrupt assertion but indentation is no good in this case. That's why there are many plugins based on expr. Folding is simply too rigid for this job. I just want to write a wrapper function to fold those long ducts. Any thoughts? On Feb 10, 2015 10:15 AM, Tim Chase v

Can someone recommend a plugin to fold python long dict spanning over many lines?

2015-02-09 Thread Bao Niu
I'm looking for a plugin in that can fold something like this: config = { '/': { 'tools.db.on': True }, /UI_JS: { tools.staticdir.on: True, tools.staticdir.root: os.path.abspath(os.getcwd()), tools.staticdir.dir: ./UI_JS }, /UI_CSS

Re: Can I mix the use of fold-expr with fold-marker just as mixing fold-expr with fold-manual?

2015-01-09 Thread Ben Fritz
On Thursday, January 8, 2015 at 8:04:18 PM UTC-6, Bao Niu wrote: Thanks Ben, I will conform to the convention and won't top-post in future. By 'storing' I actually did not refer to persisting, but temporary. When I use foldmethod=expr to automatically fold up my classes, the foldlevel must

Re: Can I mix the use of fold-expr with fold-marker just as mixing fold-expr with fold-manual?

2015-01-08 Thread Bao Niu
topics. I suggested you create a fold expression to use with foldmethod=expr. This expression is best placed into a function which is loaded with the rest of your Vim config. Alternatively, you can create a one-liner expression (not a function) and put it in a modeline in the file itself

Re: Can I mix the use of fold-expr with fold-marker just as mixing fold-expr with fold-manual?

2015-01-08 Thread Ben Fritz
. Vim does not store your folds anywhere, unless you're referring to the :mkview command, in which case a separate file is used. Where that file is stored should be documented in :help :mkview or one of the linked help topics. I suggested you create a fold expression to use with foldmethod=expr

Re: Can I mix the use of fold-expr with fold-marker just as mixing fold-expr with fold-manual?

2015-01-07 Thread Ben Fritz
to indentation rules so marker would be ideal. The only concern about using manual method is once I switch to manual, can I still automatically fold up classes that are created after switching? What do pros normally do to solve this? Any hint or url would be highly appreciated. Thanks

Re: Can I mix the use of fold-expr with fold-marker just as mixing fold-expr with fold-manual?

2015-01-07 Thread Bao Niu
still automatically fold up classes that are created after switching? What do pros normally do to solve this? Any hint or url would be highly appreciated. Thanks. In that case, it sounds like you want to define a custom function to return a fold level, and use that as the foldexpr

Re: Can I mix the use of fold-expr with fold-marker just as mixing fold-expr with fold-manual?

2015-01-06 Thread Bao Niu
using manual method is once I switch to manual, can I still automatically fold up classes that are created after switching? What do pros normally do to solve this? Any hint or url would be highly appreciated. Thanks. On Tue, Jan 6, 2015 at 8:05 PM, Ben Fritz fritzophre...@gmail.com wrote: On Tuesday

Re: Can I mix the use of fold-expr with fold-marker just as mixing fold-expr with fold-manual?

2015-01-06 Thread Ben Fritz
. This will not remove the defined folds. Then you can delete or add folds manually. It works very well. However, if I want to switch to marker instead of manual, I would lose all the foldings! Is there a way to mix up the expression fold-method with the marker fold-method? Thanks

Re: Can I mix the use of fold-expr with fold-marker just as mixing fold-expr with fold-manual?

2015-01-06 Thread Ben Fritz
. This will not remove the defined folds. Then you can delete or add folds manually. It works very well. However, if I want to switch to marker instead of manual, I would lose all the foldings! Is there a way to mix up the expression fold-method with the marker fold-method? Thanks

Can I mix the use of fold-expr with fold-marker just as mixing fold-expr with fold-manual?

2015-01-03 Thread Bao Niu
to marker instead of manual, I would lose all the foldings! Is there a way to mix up the expression fold-method with the marker fold-method? 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

Re: Fold first paragraph, including its children based on indent

2014-11-14 Thread Christian Brabandt
Am 2014-11-14 01:44, schrieb fpx...@gmail.com: For note-taking I use vim. I would like to keep a convenient overview of my notes with folding. Therefor I’m using the fold method “indent”. However, this method doesn’t cover all my needs. I would like to be able to fold all indent levels

Re: Fold first paragraph, including its children based on indent

2014-11-14 Thread Vlad Irnov
On 11/13/14, fpx...@gmail.com fpx...@gmail.com wrote: For note-taking I use vim. I would like to keep a convenient overview of my notes with folding. Therefor I’m using the fold method “indent”. However, this method doesn’t cover all my needs. I would like to be able to fold all indent

Fold first paragraph, including its children based on indent

2014-11-13 Thread fpxo13
For note-taking I use vim. I would like to keep a convenient overview of my notes with folding. Therefor I’m using the fold method “indent”. However, this method doesn’t cover all my needs. I would like to be able to fold all indent levels, including the first paragraph. Unfortunately

Re: vim fold: how to avoid the +-- marks

2014-04-27 Thread Nikolay Pavlov
On Apr 27, 2014 6:30 AM, ping song songpingem...@gmail.com wrote: experts: a question about vim fold: I can fold these: a b c d e into : a b +-- 2 lines: c e I just wonder, how to avoid displaying the +--, and just leave it as: a b 2 lines

vim fold: how to avoid the +-- marks

2014-04-26 Thread ping song
experts: a question about vim fold: I can fold these: a b c d e into : a b +-- 2 lines: c e I just wonder, how to avoid displaying the +--, and just leave it as: a b 2 lines: c e sometime this looks cleaner for me... especially if I need to refer the folded

Is it possible to place a sign on a fold summary line?

2014-01-13 Thread Andrew Stewart
Hello, When a fold is closed the text shown is governed by the `foldtext` option. Is it possible to place a sign on such a line? I haven't been able to do it myself but before I rule it out I wanted to check with the group here. Thanks in advance, Andy Stewart -- -- You received

Re: Is it possible to place a sign on a fold summary line?

2014-01-13 Thread Christian Brabandt
On Mon, January 13, 2014 14:42, Andrew Stewart wrote: When a fold is closed the text shown is governed by the `foldtext` option. Is it possible to place a sign on such a line? I haven't been able to do it myself but before I rule it out I wanted to check with the group here. Well, you can

Re: Is it possible to place a sign on a fold summary line?

2014-01-13 Thread Andrew Stewart
On 13 Jan 2014, at 14:49, Christian Brabandt cbli...@256bit.org wrote: Well, you can of course place a sign there. It just won't be visible in the folded region. Thank you. That has been addressed in the dev list several times, but Bram didn't want to change it. I had checked vim_use but

Re: display the title of current fold in the statusline

2013-12-30 Thread BimbaLaszlo
I just did it! :) A big thanks for the tips again! highlight link StatFnameStatusLine highlight link StatFenc StatusLineNC highlight link StatPath LineNr highlight link StatLnum StatusLineNC highlight link StatFnameINS StatusLine highlight link StatFencINS StatPath highlight

Re: display the title of current fold in the statusline

2013-12-30 Thread BimbaLaszlo
... modified to show the full fold-tree like here: http://s13.postimg.org/9tql8bpzb/statusline.png highlight link StatFnameStatusLine highlight link StatFenc StatusLineNC highlight link StatPath LineNr highlight link StatLnum StatusLineNC highlight link StatFnameINS StatusLine

Re: display the title of current fold in the statusline

2013-12-29 Thread BimbaLaszlo
Thanks for the tips, but i think it would be too complex for a statusline function. -- -- 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

display the title of current fold in the statusline

2013-12-28 Thread BimbaLaszlo
I have a custom statusline and i like to display the title of the fold where the cursor is in while i'm in insert mode. Here's my statusline: highlight link StatFnameStatusLine highlight link StatFenc StatusLineNC highlight link StatPath LineNr highlight link StatLnum

Re: display the title of current fold in the statusline

2013-12-28 Thread Nikolay Pavlov
On Dec 28, 2013 5:38 PM, BimbaLaszlo bimba.las...@gmail.com wrote: I have a custom statusline and i like to display the title of the fold where the cursor is in while i'm in insert mode. Here's my statusline: highlight link StatFnameStatusLine highlight link StatFenc StatusLineNC

Re: display the title of current fold in the statusline

2013-12-28 Thread BimbaLaszlo
How can i use it? I like to know in which fold the cursor is, which fold is under editing, but the help says it returns the title of closed folds: foldtextresult({lnum}) *foldtextresult()* Returns the text that is displayed for the closed fold

Re: display the title of current fold in the statusline

2013-12-28 Thread Nikolay Pavlov
On Dec 28, 2013 6:57 PM, BimbaLaszlo bimba.las...@gmail.com wrote: How can i use it? I like to know in which fold the cursor is, which fold is under editing, but the help says it returns the title of closed folds: I do not know how to operate on open folds. In fact the only my plugin

Re: Don't fold C++ namespaces.

2013-11-10 Thread benjamin schnitzler
Hi Gerardo, You could try to put something like that into your .vimrc: au BufReadPost *.cpp :syntax region overwrite_cBlock start=\(namespace .* \)\@={ end=} The overwrite_cBlock region will override the cBlock definition when it is executed after the commands from c.vim and thus the fold

Re: Fold state voided on buffer switching

2013-08-18 Thread Fabien Meghazi
On Wed, Aug 14, 2013 at 10:54 PM, Christian Brabandt cbli...@256bit.org wrote: Is there a way to prevent loosing the folding state when cycling buffers ? I think, :set hidden should prevent this. Thanks Christian, the hidden option did the trick! -- Fabien Meghazi Website:

Automatically open fold with enter in normal mode?

2013-08-16 Thread Reckoner
Hi, I'm using vim 7.3 on windows 8. Is there a way to setup a normal mode mapping where if I hit enter on a folded section, it will open that section (as in zO). The trick is that I only want that mapping to work *while on a folded line* and not otherwise map enter elsewhere. Possible?

Re: Automatically open fold with enter in normal mode?

2013-08-16 Thread Jürgen Krämer
Hi, Reckoner wrote: I'm using vim 7.3 on windows 8. Is there a way to setup a normal mode mapping where if I hit enter on a folded section, it will open that section (as in zO). The trick is that I only want that mapping to work *while on a folded line* and not otherwise map enter

Re: Automatically open fold with enter in normal mode?

2013-08-16 Thread David Fishburn
scenarios, when the fold is in different spots (top of window, bottom, middle and so on). David -- -- 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

Fold state voided on buffer switching

2013-08-14 Thread Fabien Meghazi
Hi all, When I'm working on a buffer with folding, let's say I unfold a function, then I switch to another buffer and switch back to the original buffer, the unfolded function is folded back. Is there a way to prevent loosing the folding state when cycling buffers ? -- Fabien Meghazi Website:

Re: Fold state voided on buffer switching

2013-08-14 Thread Ben Fritz
On Wednesday, August 14, 2013 4:53:16 AM UTC-5, Fabien Meghazi wrote: Hi all, When I'm working on a buffer with folding, let's say I unfold a function, then I switch to another buffer and switch back to the original buffer, the unfolded function is folded back. Is there a way

Re: Fold state voided on buffer switching

2013-08-14 Thread Christian Brabandt
Hi Fabien! On Mi, 14 Aug 2013, Fabien Meghazi wrote: Hi all, When I'm working on a buffer with folding, let's say I unfold a function, then I switch to another buffer and switch back to the original buffer, the unfolded function is folded back. Is there a way to prevent loosing the

Don't fold C++ namespaces.

2013-06-30 Thread Gerardo Marset
I've got foldmethod set to syntax. How can I tell vim not to fold C++ namespace blocks? I was able to do it actually, by editing the cBlock sytanx region in the default c.vim syntax file like this: syn region cBlock start=\(namespace .* \)\@!{ end=} transparent fold But it just doesn't look

Re: vim : fold expansion and refresh

2013-03-14 Thread ping
On 07/12/2012 05:31 PM, Andy Wokula wrote: Am 12.07.2012 22:55, schrieb sc: On Thu, Jul 12, 2012 at 04:22:29PM -0400, ping wrote: guys: everytime I expand the fold , I notice the text got a little bit messed up somewhere, c-l quickly clean it nicely. so if I map l as following: :map l zoC

Re: vim: fold all siblings

2013-03-12 Thread ping
disabled the html checkbox in TB... sorry about that. will check once I got a chance to touch my work PC. Are you looking for the zr and zR commands? You mentioned trying zc, zC, zm, and zM. Rather than using zo or za to open a fold, you could zr until you have the view you want. If you manually

Re: vim: fold all siblings

2013-03-12 Thread ping
. again HTML? I thought I carefully disabled the html checkbox in TB... sorry about that. will check once I got a chance to touch my work PC. Are you looking for the zr and zR commands? You mentioned trying zc, zC, zm, and zM. Rather than using zo or za to open a fold, you could zr until you have

Re: vim: fold all siblings

2013-03-12 Thread Ben Fritz
On Tuesday, March 12, 2013 11:45:36 AM UTC-5, ping wrote: On 3/11/2013 4:29 PM, Ben Fritz wrote: On Monday, March 11, 2013 2:53:10 PM UTC-5, ping wrote a big HTML formatted message, which the Google Groups interface mangles too much on reply to be worth quoting, where he asked how to

vim: fold all siblings

2013-03-11 Thread ping
I've been trying most zKEYs , but haven't found oneto effectively fold all siblings(but not to close upto the parent fold). I knowzm , zc, zC, but they are not doing what I meant... think about this: { interface fxp0.0 { disable; } interface lo0.100

  1   2   3   4   >