All Projects → jeetsukumaran → Vim Indentwise

jeetsukumaran / Vim Indentwise

A Vim plugin for indent-level based motion.

Labels

Projects that are alternatives of or similar to Vim Indentwise

Minivimrc
a tiny vimrc to be used primarily for troubleshooting plugins
Stars: ✭ 140 (-12.5%)
Mutual labels:  viml
Dotvim
A community driven framework for vim
Stars: ✭ 151 (-5.62%)
Mutual labels:  viml
Pdv
PHP Documentor for VIM - Generates PHP docblocks
Stars: ✭ 158 (-1.25%)
Mutual labels:  viml
Matchit.zip
extended % matching for HTML, LaTeX, and many other languages
Stars: ✭ 146 (-8.75%)
Mutual labels:  viml
Vim Jekyll
📝 Fork of psykidellic/vim-jekyll because actually forking it freaks out
Stars: ✭ 151 (-5.62%)
Mutual labels:  viml
Vim Flavored Markdown
Stars: ✭ 153 (-4.37%)
Mutual labels:  viml
Inkpot
Inkpot 88/256 Colour Scheme for Vim
Stars: ✭ 138 (-13.75%)
Mutual labels:  viml
Vimerl
A set of erlang plugins for VIM. This is not maintained, better use som modern fork of this!
Stars: ✭ 159 (-0.62%)
Mutual labels:  viml
Vimside
Vim Scala IDE (VimSIde) built upon ENSIME
Stars: ✭ 151 (-5.62%)
Mutual labels:  viml
Vim Galore
🎓 All things Vim!
Stars: ✭ 12,610 (+7781.25%)
Mutual labels:  viml
Tlib vim
Some utility functions for VIM
Stars: ✭ 147 (-8.12%)
Mutual labels:  viml
Mru.vim
Plugin to manage Most Recently Used (MRU) files
Stars: ✭ 149 (-6.87%)
Mutual labels:  viml
Vim Project
lcd to the root of the project everytime you BufEnter a file inside a project.
Stars: ✭ 155 (-3.12%)
Mutual labels:  viml
C.vim
C/C++ IDE -- Write and run programs. Insert statements, idioms, comments etc.
Stars: ✭ 142 (-11.25%)
Mutual labels:  viml
Vim As An Ide
Workshop on how to use Vim Plugins.
Stars: ✭ 1,915 (+1096.88%)
Mutual labels:  viml
Vim Textobj Indent
Vim plugin: Text objects for indented blocks of lines
Stars: ✭ 140 (-12.5%)
Mutual labels:  viml
Vim Tmuxify
Vim plugin for handling tmux panes.
Stars: ✭ 152 (-5%)
Mutual labels:  viml
Vim Config Python Ide
Symlink the .vim dir and the .vimrc file and start kicking ass
Stars: ✭ 159 (-0.62%)
Mutual labels:  viml
Vim Markbar
Display all accessible marks and their surrounding lines in a collapsible sidebar.
Stars: ✭ 159 (-0.62%)
Mutual labels:  viml
Vim Operator Flashy
🔦 Highlight yanked area
Stars: ✭ 156 (-2.5%)
Mutual labels:  viml

IndentWise

Description

IndentWise is a Vim plugin that provides for motions based on indent depths or levels in normal, visual, and operator-pending modes.

Movements by Relative Indent-Depth

The following key-mappings provide motions to go to lines of lesser, equal, or greater indent than the line that the cursor is currently on:

  • [- : Move to previous line of lesser indent than the current line.
  • [+ : Move to previous line of greater indent than the current line.
  • [= : Move to previous line of same indent as the current line that is separated from the current line by lines of different indents.
  • ]- : Move to next line of lesser indent than the current line.
  • ]+ : Move to next line of greater indent than the current line.
  • ]= : Move to next line of same indent as the current line that is separated from the current line by lines of different indents.

The above all take a {count}, so that, e.g., 4[- will move to the previous line that is 4 indent-depths less than the current one. An "indent-depth" is simply the indentation of the line, and thus any line with a smaller amount of indentation relative to current line is considered at a lesser indent depth, and, conversely, any line with a greater indentation than the current line is considered to be at a greater indent-depth.

Movements by Absolute Indent-Levels

In addition, you can navigate directly to a line of a particular indent-level, with the level specified by a (mandatory) {count} directive, using:

  • {count}[_ : Move to previous line with indent-level of {count}.
  • {count}]_ : Move to next line with indent-level of {count}.

An "indent-level" of a line is the number of shiftwidth units that the line is indented (as opposed to the "indent-depth", which is just the indentation amount of a line).

Movements by Indent-Block Scope

The following key-mappings provide motions based on indent-block scope boundaries, with an optional {count} directive specifying the number of levels of scope to include:

  • [% : Move to beginning of indent-block scope (i.e., move to the line just after the previous line of lesser indent); repeat for {count} outer scopes.
  • ]% : Move to end of indent-block scope (i.e., move to the line just before the next line of lesser indent); repeat for {count} outer scopes.

Customization

If you are unhappy with the default key-mappings you can provide your own by defining custom mappings in your .vimrc. For example to replicate the default mappings, you would define the following:

map [- <Plug>(IndentWisePreviousLesserIndent)
map [= <Plug>(IndentWisePreviousEqualIndent)
map [+ <Plug>(IndentWisePreviousGreaterIndent)
map ]- <Plug>(IndentWiseNextLesserIndent)
map ]= <Plug>(IndentWiseNextEqualIndent)
map ]+ <Plug>(IndentWiseNextGreaterIndent)
map [_ <Plug>(IndentWisePreviousAbsoluteIndent)
map ]_ <Plug>(IndentWiseNextAbsoluteIndent)
map [% <Plug>(IndentWiseBlockScopeBoundaryBegin)
map ]% <Plug>(IndentWiseBlockScopeBoundaryEnd)

Installation

pathogen.vim

$ cd ~/.vim/bundle
$ git clone git://github.com/jeetsukumaran/vim-indentwise.git

Vundle

:BundleInstall jeetsukumaran/vim-indentwise

Add the line below into your .vimrc.

Bundle 'jeetsukumaran/vim-indentwise'

Manually

Copy the plugin/indentwise.vim file to your .vim/plugin directory and the doc/indentwise.txt file to your .vim/doc directory.

Acknowledgements

IndentWise is based on the following:

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