All Projects β†’ tweekmonster β†’ Braceless.vim

tweekmonster / Braceless.vim

🐍 Text objects, folding, and more for Python and other indented languages.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Braceless.vim

vim-mix
Vim plugin for using Elixir's build tool, mix
Stars: ✭ 63 (-83.24%)
Mutual labels:  vim-plugins
vim-js-file-import
Import/require files in javascript and typescript with single button!
Stars: ✭ 130 (-65.43%)
Mutual labels:  vim-plugins
Vim Smartinput
Vim plugin: Provide smart input assistant
Stars: ✭ 312 (-17.02%)
Mutual labels:  vim-plugins
go-vim-install
Easy environment setup for Vim addicts and go developers
Stars: ✭ 68 (-81.91%)
Mutual labels:  vim-plugins
vim-sequence-diagram
A Vim plugin for previewing sequence diagram in a browser
Stars: ✭ 53 (-85.9%)
Mutual labels:  vim-plugins
VimFold4C
Vim folding ftplugin for C & C++ (and similar langages)
Stars: ✭ 37 (-90.16%)
Mutual labels:  vim-plugins
vim-gitbranch
Provides the branch name of the current git repository
Stars: ✭ 171 (-54.52%)
Mutual labels:  vim-plugins
Rainbow csv
🌈Rainbow CSV - Vim plugin: Highlight columns in CSV and TSV files and run queries in SQL-like language
Stars: ✭ 337 (-10.37%)
Mutual labels:  vim-plugins
vim-tmuxlike
A vim plugin that mimics the actions of tmux. εƒζ“δ½œTmuxδΈ€ζ ·ζ“δ½œVim
Stars: ✭ 20 (-94.68%)
Mutual labels:  vim-plugins
Vim Textobj Entire
Vim plugin: Text objects for entire buffer
Stars: ✭ 311 (-17.29%)
Mutual labels:  vim-plugins
vim-inccomplete
Vim plugin for #include directive completion.
Stars: ✭ 14 (-96.28%)
Mutual labels:  vim-plugins
vim-bettergrep
A better way to grep in vim.
Stars: ✭ 15 (-96.01%)
Mutual labels:  vim-plugins
vim-hclfmt
Vim plugin for hclfmt
Stars: ✭ 68 (-81.91%)
Mutual labels:  vim-plugins
vim-mypy
Vim plugin for executing Python's optional static type checker MyPy (http://mypy-lang.org/)
Stars: ✭ 89 (-76.33%)
Mutual labels:  vim-plugins
Vim Dadbod Ui
Simple UI for https://github.com/tpope/vim-dadbod
Stars: ✭ 315 (-16.22%)
Mutual labels:  vim-plugins
quicktex
A vim plugin for writing Latex quickly.
Stars: ✭ 110 (-70.74%)
Mutual labels:  vim-plugins
bufstop
Fast and efficient buffer switching for Vim
Stars: ✭ 82 (-78.19%)
Mutual labels:  vim-plugins
Winresizer
very simple vim plugin for easy resizing of your vim windows
Stars: ✭ 353 (-6.12%)
Mutual labels:  vim-plugins
Pear Tree
A Vim auto-pair plugin that supports multi-character pairs, intelligent matching, and more
Stars: ✭ 327 (-13.03%)
Mutual labels:  vim-plugins
vim-hugo-helper
A small Vim plugin with a set of helpers for Hugo https://gohugo.io
Stars: ✭ 82 (-78.19%)
Mutual labels:  vim-plugins

Braceless Build Status

Text objects, folding, and more for Python and other indented languages. CoffeeScript support is already baked in, but mainly as an incomplete proof of concept.

Usage

Use your favorite plugin plugin of choice to install tweekmonster/braceless.vim, then add a line like this to your vimrc file:

autocmd FileType python BracelessEnable +indent

The command arguments are:

Option Description
+indent Enable indent handling
+fold Enable folding
+fold-slow Enable indentexpr folding, which is depreciated and slow
+highlight Enable indent guide
+highlight-cc Enable indent guide, but use colorcolumn
+highlight-cc2 Enable indent guide and use colorcolumn

The default motion of interest is P. It can be used for things like vaP, ciP, >iP, etc. :h braceless Covers the details of this plugin.

Text objects

Braceless doesn't give you similarly indented blocks as text objects. You get actual code blocks using iP and aP.

braceless-motions

Object motions

Moving to recognized blocks is done with [[ and ]]. In Python, [m and ]m moves to def and class blocks, while [M and ]M moves to the end of those blocks.

braceless-movement

Folding

Get useful code folding by adding +fold. Unfortunately, this can be a little slow on large scripts. Folding is now much faster! Read the boring exciting details in :h braceless-folds!

braceless-fold

Indent guide

See what indent level you're operating on with +highlight. You can also enable colorcolumn so the guide can span the height of the window. If you would like this kind of indent highlighting in other files that don't need Braceless, take a look at local-indent.vim

braceless-highlight

Somewhat intelligent auto-indent

Ever wished for autoindent that didn't make you fix the indent? Wish no more, pal. Just add +indent. It's not perfect, but it's definitely better. There is even PEP 8 indentation built in, and if you use delimitMate with the expand_cr option enabled, Braceless will disable it temporarily when you're messing with block arguments.

braceless-autoindent

(The backspace key was never used in the image above)

EasyMotion

Built-in support for EasyMotion.

braceless-easymotion

Not just Python!

Braceless can simply recognize indentation.

braceless-others

The above GIF was using:

autocmd FileType haml,yaml,coffee BracelessEnable +indent +fold +highlight

You can extend Braceless to give full support to other indented languages. See :h braceless-custom

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].