Showing posts with label management. Show all posts
Showing posts with label management. Show all posts

Monday, October 28, 2013

Pathogen Makes Plugin Management Easy

I have been using Pathogen for installing new plugins whenever possible for quite a while now. In my opinion, Pathogen is the simplest path to extending your existing Vim runtime with additional functionality.

You can install Pathogen with the following command (assuming you're using a Linux operating system).

mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -Sso ~/.vim/autoload/pathogen.vim \
https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
Once Pathogen is installed, enable it by adding the following to your .vimrc.
execute pathogen#infect()
Once Pathogen is enabled, you can install a wealth of plugins by simply cloning them to your ~/.vim/bundle directory. As an example, you can install the vim-sensible plugin as follows.
cd ~/.vim/bundle
git clone git://github.com/tpope/vim-sensible.git

Monday, March 9, 2009

Tab Buffer Browsing

Using the following mappings in normal mode provides a convenient way to easily switch between the next and previous buffers.

nmap <tab> :bn<cr>
nmap <s-tab> :bp<cr>

Thanks to Chris for the tip!

Tuesday, August 5, 2008

Window Manipulation

If you have two horizontally split windows and would like to increase the size of the current window, you can do ctrl-w +. A count can be issued beforehand, so to increase the height by 10 lines 10 ctrl-w +. Ctrl-w - will decrease the current window height. To set the current window to an absolute height do N ctrl-w _ where N is the number of lines desired.

In a vertically split scheme, you can use ctrl-w < and ctrl-w > to adjust the width. To set the current window to an absolute width, do N ctrl-w | where N is the number of lines desired.

If you have two windows split horizontally and would like to shift to a vertical scheme, you can do ctrl-w H or ctrl-w L depending on which direction you want the current window to go. Ctrl-w J and ctrl-w K will take a vertically split scheme to a horizontal orientation.