Giter Club home page Giter Club logo

.vim's Introduction

VIM Configuration files

These configuration files require ruby support to be compiled into vim. The installation script provided below downloads vim from source, and compiles the necessary support, in addition to installing the vim config

Installation

Quickstart:

Run this in a shell for the fast automatic installation. It executes the commands listed below in Normal Installation

bash < <( curl -L tiny.cc/vimsid )

Normal Installation:

download repository along with all git submodules

git clone --recursive git://github.com/sid137/.vim.git ~/.vim

Create a symlink to .vimrc file

ln -s ~/.vim/vimrc ~/.vimrc

VIM Needs to be compiled from source. Download the source using Mercurial

hg clone https://vim.googlecode.com/hg/ ~/vim

Enter the vim source directory

cd ~/vim

and use the following configuration options

http://204.152.191.100:8080/wiki/index.php/Configure_options_-_vim ./configure --enable-rubyinterp --enable-pythoninterp --enable-python3interp --enable-perlinterp --enable-cscope --enable-multibyte --with-features=huge --enable-fontset --enable-xim --with-x --prefix=$HOME/vim

make; make install

You then need to add the compiled vim executable to your PATH.
You can add the following line to your .zshrc or .bashrc config file

export PATH=$PATH:$HOME/vim/bin

Features

Look for more vim things here

#https://github.com/vim-scripts

Plugins loaded from .vim/bundle directory with Pathogen (vim.org) (github)

Customizations

General Settings

  • Text wrapped to 80 character lines

  • 1000 line history and undo

  • Tab stop at 4 spaces

  • Tabs are converted to spaces

  • Current line is highlighted

  • Mouse enabled for all modes

Key Mappings (subject to change)

  • Leader key mapped to

    ,

  • Fast saving in Insert and Normal mode

    ,w

  • Easily edit the .vimrc from Insert mode

    ,e

  • Return to Normal mode from Insert mode

    jk or ,,

  • Reload the .vimrc file from Normal mode

    ,sv

  • Turn ; into : in Normal mode

  • Clean highlighted searches from Normal mode

    ,/

  • Save file with sudo priviledges

    w!!

  • Close current buffer

    ,bd

  • Close all buffers

    ,ba

  • Switch between buffers using left and right arrow keys

  • Smart way to move btw. windows

map j map k map h map l

Autocommands

  • .vimrc automatically reloaded when edited from VIM

  • Run script with F5 key when shebbang is present

Ruby mappings

  • Bind control-l to hashrocket =>

  • convert word into ruby symbol

    <C-k> <C-o>

    inoremap [[ ?def inoremap ]] /def

    nmap [[ ?def nmap ]] /def

    inoremap ; : inoremap ;; ; inoremap 2 " inoremap 22 2 imap 9 ( inoremap 99 9 imap 0 ) inoremap 00 0 inoremap \ | inoremap \
    inoremap ;; ;

Nerdtree Plugin

  • Toggle Nerdtree

    ,n

  • Close Nerdtree

    ,N

CommandT Mappings

  • Call Command-T in Insert mode

    ,t

  • Flush/Reload Command-T

    ,y

Commenting and Uncommenting blocks for line visual mode (Shift-V)

Load comments.vim for easy commenting

http://www.vim.org/scripts/script.php?script_id=1528

  • Comment selected block of text

    Ctrl-C

  • Uncomment a selected block of text

    Ctrl-X

" Use AutoCMD to automaticall create nonexistant directories on save " http://www.ibm.com/developerworks/linux/library/l-vim-script-5/index.html

Snipmate

  • Create snippet from buffer Insert or Normal mode

    ,ca snippet_name

  • Autoclose snippet buffer on save

  • Snippets use filetype of original bufffer instead of default "snippet" filetype, allowing you to use snippets to make snippets

.vim's People

Contributors

sid137 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.