Last active
December 3, 2016 15:59
-
-
Save shivamMg/b51dea746db175b9db6bfaa87f5480df to your computer and use it in GitHub Desktop.
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
| set nocompatible | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| Plugin 'VundleVim/Vundle.vim' | |
| Plugin 'tpope/vim-sensible' | |
| Plugin 'itchyny/lightline.vim' | |
| Plugin 'morhetz/gruvbox' | |
| call vundle#end() | |
| set number | |
| set relativenumber | |
| set numberwidth=3 | |
| set hlsearch | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set expandtab | |
| " Mouse in all modes | |
| set mouse=a | |
| " Set 7 lines to the cursor - when moving vertically using j/k | |
| set so=7 | |
| set noswapfile | |
| set encoding=utf-8 | |
| scriptencoding utf-8 | |
| set ignorecase | |
| set smartcase | |
| set hlsearch | |
| set incsearch | |
| " Remap VIM 0 to first non-blank character | |
| map 0 ^ | |
| let mapleader = ',' | |
| let g:mapleader = ',' | |
| " Pressing ,ss will toggle and untoggle spell checking | |
| map <leader>ss :setlocal spell!<cr> | |
| " Fast saving | |
| nmap <leader>w :w!<cr> | |
| " Copy to system clipboard | |
| vnoremap <C-c> "+y | |
| " Paste from system clipboard | |
| nnoremap <C-x> "+gP | |
| " Toggle paste mode on and off | |
| map <leader>pp :setlocal paste!<cr> | |
| " :W sudo save the file | |
| command! W w !sudo tee % > /dev/null | |
| " Movement between windows | |
| map <C-j> <C-w>j | |
| map <C-k> <C-w>k | |
| map <C-h> <C-w>h | |
| map <C-l> <C-w>l | |
| set background=dark | |
| let g:gruvbox_contrast_dark = 'hard' | |
| colorscheme gruvbox | |
| " Use gruvbox for lightline: | |
| " \ 'colorscheme': 'gruvbox', | |
| let g:lightline = { | |
| \ 'component': { | |
| \ 'readonly': '%{&readonly?"⭤":""}', | |
| \ }, | |
| \ 'separator': { 'left': '⮀', 'right': '⮂' }, | |
| \ 'subseparator': { 'left': '⮁', 'right': '⮃' } | |
| \ } | |
| " Patched fonts for use in lightline: | |
| " https://github.com/Lokaltog/vim-powerline/tree/develop/fontpatcher | |
| " Set GVIM specific settings | |
| if has("gui_running") | |
| set guifont=Source\ Code\ Pro\ for\ Powerline\ Medium\ 9 | |
| colorscheme gruvbox | |
| set lines=30 | |
| set columns=100 | |
| endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment