Comments (4)
I could easily add a way to configure which blocks to fold on. I would have to look into the fold markers, so no promises there.
from braceless.vim.
You mean user configurable block identifiers !? That would be cool indeed !
I don't know how markers works under the hood (I don't know vimscript in fact) but as they allow one to declare custom folding they are quite handy.
from braceless.vim.
@amigrave Yup, I'm working on configurable block folding. The issue off the top of my head with fold markers is that braceless deals with inferred block endings, not explicit ones. Something like this might not work out well:
def example1():
# line 1
# {{{
# line 3
pass
def example2():
# line 1
# }}}
# line 3
pass
I know that's not that likely to happen on purpose, but could happen in pastes. I do want to add folding for collection symbols (()
, []
, and {}
), but that's something I want to tackle after I've figured out a better way to handle foldexpr
. It's still pretty slow even with caching and it most likely could be sped up by doing "good enough" block scanning instead of getting the true block boundaries. So, I'd rather not slow it down by checking for explicit start and end symbols before using block boundaries at the moment.
from braceless.vim.
You can set folds for def
or class
using this in your configs:
let braceless#pattern#python = {
\ 'fold': '\<\%(def\|class\)\>\_.\{-}:\s*\%(\_$\|#\)'
\ }
from braceless.vim.
Related Issues (20)
- Is it possible to tune dedenting by Enter key? HOT 4
- <CR> not working HOT 5
- E132: Function call depth is higher than 'maxfuncdepth' HOT 6
- Bad fold interaction with sessions HOT 1
- Custum popup handling for <cr> mapping HOT 3
- GVim window view moving on `o` or `O` with option +indent HOT 1
- Removal of whitepsace surround operators on 'J'oin lines HOT 5
- g] doesn't work? HOT 5
- Jumping between classes? HOT 7
- Losing backslash and double quotes when joining two lines together HOT 3
- Incorrect auto-indenting after decorator line? HOT 4
- braceless make "o" in normal node very slow HOT 10
- zf is unconditionally mapped to a notification HOT 4
- Found a pathological case for indenting HOT 3
- Feature Request: Highlight Toggle
- Incorrectly adds \ at end of line
- No auto-indent for coroutines HOT 2
- BracelessEnable in ftplugin works but raises error while opening files HOT 1
- help conflict : need fixing help tag; that change to plugin-prefix using HOT 4
- All sorts of problems with `o` command
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from braceless.vim.