Sunday, September 30, 2018

Installing and using nerdcommenter

Sometime you are lazy to type a comment tag on a certain code and you want a fast acting solution.

Install  github nerdcommenter

Open command line (for pathogen)

type


cd ~/.vim/bundle/

git clone https://github.com/scrooloose/nerdcommenter.git

To test it out try some files like python, C, or HTML


I'm using Foundations for Emails 2 as a demo html

in Vim normal mode type "\cc" to comment out a line

If you scroll down at the nerdcommenter's github page you will see a "leader". It means key is mapped to \ by default.


For Pathogen:

Before you run help for nerdcommenter, be sure to type in ":Helptags" to load documentation globally or else you're going to get the "Sorry, no help for "

Resources:

Stackoverflow - What is a Leader in a vimrc file?

Learn Vim The Hard Way - Vim Leaders

How to use Tim Pope's Pathogen - :Helptags







Saturday, September 29, 2018

Installing NERDTree in OpenSuse 42.3



If you're using pathogen to handle vim plugins

Go to Github NERDTree


Open the command line and type

cd .vim/bundle/

then

git clone https://github.com/scrooloose/nerdcommenter.git

add lines to .vimrc that automatically startups the NERDTree

autocmd vimenter * NERDTree

Resources:

Github NERDTree

VIM Awesome NERDTree

VIM Wikia Use Vim like an IDE