Skip to content

Instantly share code, notes, and snippets.

@i11v
Last active December 10, 2015 02:58

Revisions

  1. i11v revised this gist Mar 14, 2014. No changes.
  2. Ilnur Khalilov revised this gist Dec 17, 2013. 1 changed file with 29 additions and 21 deletions.
    50 changes: 29 additions & 21 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -5,8 +5,9 @@
    " Disable compability with vi
    set nocompatible

    " Disable backup
    set nobackup
    " Set backup dirs
    set dir=~/tmp
    set bdir=~/.backup

    " Show cursor position all the time
    set ruler
    @@ -17,7 +18,11 @@ set showcmd
    " Show line numbers
    set nu

    " Indenting
    " Draw whitespaces
    set list
    set listchars=tab:>-,eol:¬,trail:.,extends:>

    " Indenting
    "set foldmethod=indent
    set autoindent
    set smartindent
    @@ -74,8 +79,9 @@ Bundle 'gmarik/vundle'
    Bundle 'scrooloose/nerdtree'
    Bundle 'scrooloose/nerdcommenter'
    Bundle 'mattn/zencoding-vim'
    Bundle 'groenewege/vim-less'
    Bundle 'KohPoll/vim-less'
    Bundle 'tpope/vim-fugitive'
    Bundle 'terryma/vim-multiple-cursors'
    " vim-scripts repos
    " non github repos

    @@ -92,35 +98,37 @@ highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE gui

    " Page down by space
    nmap <Space> <PageDown>
    " Ctrl+f for omni completion
    "
    "" Ctrl+f for omni completion
    imap <C-f> <C-x><C-o>
    " Ctrl+Z
    "
    "" Ctrl+Z
    imap <C-z> <Esc>ui
    " Dublicate string
    "
    "" Dublicate string
    imap <C-d> <Esc>yypi
    " Delete string
    "
    "" Delete string
    nmap <C-y> dd
    imap <C-y> <Esc>ddi
    " Fast save
    "
    "" Fast save
    nmap <F2> :w<CR>
    vmap <F2> <Esc>:w<CR>
    imap <F2> <Esc>:w<CR>i
    " Fast save and close tab
    "" Fast save and close tab
    nmap <F10> :q<CR>
    vmap <F10> <Esc>:q<CR>
    imap <F10> <Esc>:q<CR>
    " Switch between splits
    "
    "" Switch between splits
    nmap <C-l> <C-w><C-w>
    nmap <C-h> <C-w><C-h>
    nmap <C-j> <C-w><C-j>
    nmap <C-k> <C-w><C-k>
    " Open new tab
    "
    "" Open new tab
    nmap <C-t> :tabnew<CR>
    imap <C-t> <Esc>:tabnew<CR>i
    "
    "" Switch between tabs
    nmap <C-]> :tabnext<CR>
    imap <C-]> <ESC>:tabnext<CR>i
  3. i11v revised this gist Dec 30, 2012. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,9 @@
    " Disable compability with vi
    set nocompatible

    " Disable backup
    set nobackup

    " Show cursor position all the time
    set ruler

    @@ -105,10 +108,12 @@ imap <C-y> <Esc>ddi
    " Fast save
    nmap <F2> :w<CR>
    vmap <F2> <Esc>:w<CR>i
    vmap <F2> <Esc>:w<CR>
    imap <F2> <Esc>:w<CR>i
    " Fast save and close tab
    nmap <F10> :q<CR>
    vmap <F10> <Esc>:q<CR>i
    vmap <F10> <Esc>:q<CR>
    imap <F10> <Esc>:q<CR>
    " Switch between splits
    nmap <C-l> <C-w><C-w>
  4. i11v created this gist Dec 25, 2012.
    121 changes: 121 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,121 @@
    " --------------------------
    " Basic preferences
    " --------------------------

    " Disable compability with vi
    set nocompatible

    " Show cursor position all the time
    set ruler

    " Show uncompleted commands on command line
    set showcmd

    " Show line numbers
    set nu

    " Indenting
    "set foldmethod=indent
    set autoindent
    set smartindent

    " Indent by filetype
    filetype plugin indent on " required!
    filetype plugin on

    " Enable Omni completion
    set ofu=syntaxcomplete#Complete

    " Incremental find
    set incsearch

    " No need to put cursor in the edge of screen to page up anymore
    set scrolljump=7

    " No need to put cursor in the edge of screen to page down anymore
    set scrolloff=7

    " Switch off annoying visual bell
    set novisualbell
    set t_vb=

    " Mouse support
    set mouse=a
    set mousemodel=popup

    " Default encoding
    set termencoding=utf-8

    " Enable syntax highlitghting
    syntax on

    " Allow to use backspace instead of 'x'
    set backspace=indent,eol,start whichwrap+=<,>,[,]

    " Default tab size
    "set shiftwidth=4
    "set softtabstop=4
    set tabstop=4

    " Vundle preferences
    set rtp+=~/.vim/bundle/vundle/
    call vundle#rc()

    " let Vundle manage Vundle
    " required!
    Bundle 'gmarik/vundle'

    " My Bundles here:
    "
    " original repos on github
    Bundle 'scrooloose/nerdtree'
    Bundle 'scrooloose/nerdcommenter'
    Bundle 'mattn/zencoding-vim'
    Bundle 'groenewege/vim-less'
    Bundle 'tpope/vim-fugitive'
    " vim-scripts repos
    " non github repos

    " --------------------------
    " Colorscheme
    " --------------------------

    colorscheme Monokai
    highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE

    " --------------------------
    " Shortcuts
    " --------------------------

    " Page down by space
    nmap <Space> <PageDown>
    " Ctrl+f for omni completion
    imap <C-f> <C-x><C-o>
    " Ctrl+Z
    imap <C-z> <Esc>ui
    " Dublicate string
    imap <C-d> <Esc>yypi
    " Delete string
    nmap <C-y> dd
    imap <C-y> <Esc>ddi
    " Fast save
    nmap <F2> :w<CR>
    vmap <F2> <Esc>:w<CR>i
    " Fast save and close tab
    nmap <F10> :q<CR>
    vmap <F10> <Esc>:q<CR>i
    " Switch between splits
    nmap <C-l> <C-w><C-w>
    nmap <C-h> <C-w><C-h>
    nmap <C-j> <C-w><C-j>
    nmap <C-k> <C-w><C-k>
    " Open new tab
    nmap <C-t> :tabnew<CR>
    imap <C-t> <Esc>:tabnew<CR>i