Last active
January 14, 2019 05:24
-
-
Save opnchaudhary/f894ee44c2c354e4c3cc2f777cbeaad2 to your computer and use it in GitHub Desktop.
My vim configurations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim Settings | |
filetype off | |
filetype plugin indent on | |
syntax on | |
set encoding=utf-8 | |
" Pathogen load | |
execute pathogen#infect() | |
execute pathogen#helptags() | |
colo minimalist | |
set clipboard=unnamed | |
" Always show statusline | |
set laststatus=2 | |
set number | |
set relativenumber | |
set background=dark | |
" Enable folding | |
set foldmethod=indent | |
set foldlevel=99 | |
" Enable folding with the spacebar | |
nnoremap <space> za | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set textwidth=79 | |
set autoindent | |
set fileformat=unix | |
" detect badwhitespace | |
":au BufRead,BufNewFile *.py, *.pyw match BadWhitespace /\s\+$/ | |
"disable the navigation keys: up,down, left, right | |
no <up> <Nop> | |
no <down> <Nop> | |
no <left> <Nop> | |
no <right> <Nop> | |
ino <up> <Nop> | |
ino <down> <Nop> | |
ino <left> <Nop> | |
ino <right> <Nop> | |
"split navigations | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
" tab navigations | |
nnoremap <C-left> :tabprevious<CR> | |
nnoremap <C-right> :tabnext<CR> | |
" FOr NERDTree | |
nnoremap <C-n> :NERDTreeToggle<CR> | |
" press Ctrl+w to save | |
nnoremap <C-w> :w<CR> | |
nnoremap <Tab> :><CR> | |
" press ctrl-s to go to shell | |
" required edit: add 'stty -ixon' in .bashrc file | |
nnoremap <C-s> :sh<CR> | |
" disable backup and swap files | |
set nobackup | |
set nowritebackup | |
set noswapfile | |
" set split behavior | |
set splitright | |
set splitbelow | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'tmhedberg/SimpylFold' | |
" Plugin for search | |
Plugin 'kien/ctrlp.vim' | |
" Plugin for git integration | |
Plugin 'tpope/vim-fugitive' | |
" Plugin for powerline | |
Plugin 'Lokaltog/powerline', {'rtp':'powerline/bindings/vim/'} | |
" Plugin for auto completion | |
Plugin 'Valloric/YouCompleteMe' | |
" Plugin form snippets | |
Plugin 'SirVer/ultisnips' | |
Plugin 'honza/vim-snippets' | |
let g:UltiSnipsExpandTrigger = "<c-j>" | |
let g:UltiSnipsJumpForwardTrigger = "<c-j>" | |
let g:UltiSnipsJumpBackwardTrigger = "<c-p>" | |
let g:UltiSnipsListSnippets = "<c-k>" "List possible snippets based on current file | |
"Plugin for file browser | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'posva/vim-vue' | |
Plugin 'rafi/awesome-vim-colorschemes' | |
call vundle#end() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment