Posts Tagged With 'vim'

How to install nerdTree in vim

Written by Hannes Bellmer in tech on Thu 19 March 2015. Tags: vim, dotfiles,

vundle is the recommended way to install nerdtree.

Best is to add Plugin 'scrooloose/nerdtree'to the .vimrc, restart vim and type :PluginInstall


I made the following adjustments in my .vimrc like posted in my Dotfiles

" Options for NERDTree, from
" Open NERDTree when no file is spcified!
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" CTRL N Toggles NERDTree
"map <silent> <C-n> :NERDTreeFocus<CR>
map <silent> <C-n> :NERDTreeToggle<CR>
" Close vim if NERDTree is the last windows
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif

Every now and then I am VIM and need to lookup something from another file, now I just press "CTRL+n", navigate to the file, press i and have t he content I need in my vim buffer.


Go to Github and have fun:

How to install vundle in vim

Written by Hannes Bellmer in tech on Wed 18 March 2015. Tags: vim, dotfiles,

Why should you use Vundle? => because it makes you vim-plugin-file sooo easy that you never want to manually do all this again.

Vundle can get a name of a plugin as it appears in the vim plugin directory, a github “:user/:repo” style string, and even a full git url.

Quick Start

Taken from the Github Page and inserted my own config as posted in my Dotfiles.

Clone the repository

Issue git clone ~/.vim/bundle/Vundle.vim in your home directory.

Adjust your .vimrc

This is part of my config. It installs Vundle itself, nerdTree, Syntax Highlight for Docker & Markdown

" Vundle
" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" Nerdtree, nothing to add
Plugin 'scrooloose/nerdtree'
" Syntax for Doccker files
Plugin 'ekalinin/Dockerfile.vim'
" Vim Markdown syntax hightlight
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just
" :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to
" auto-approve removal
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
Install Plugins:

Launch vim and run :PluginInstall.

To install from command line: vim +PluginInstall +qall