-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Akash Shende
authored and
Akash Shende
committed
Jun 5, 2020
1 parent
3788a95
commit 58e54ff
Showing
1 changed file
with
60 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,74 @@ | ||
set nocp | ||
" setting FF type | ||
set ff=unix | ||
set laststatus=2 | ||
"---------- Basic ---------- | ||
set nocompatible | ||
set noswapfile "disable ugly .swp files | ||
set history=1000 | ||
set scrolloff=2 "number of screen lines below/above cursor while scrolling | ||
set undodir=~/.vim/undodir | ||
set undofile | ||
set fileformat=unix | ||
set showcmd "show command at bottom bar | ||
set lazyredraw | ||
set showmatch "show matching parenthesis or similar | ||
|
||
"set leader | ||
let mapleader="\\" | ||
"run pylint | ||
nnoremap <leader>] :!pylint %<CR> | ||
nnoremap <leader>e :!pylint -E %<CR> | ||
"set foldmethod=indent | ||
set foldlevel=-1 | ||
"set noexpandtab | ||
set tabstop=4 | ||
set shiftwidth=4 | ||
set expandtab | ||
colorscheme desert | ||
|
||
"call pathogen#infect() | ||
syntax on | ||
filetype plugin indent on | ||
call pathogen#infect() | ||
"call pathogen#runtime_append_all_bundles() | ||
call pathogen#helptags() | ||
"----------- Plugins -------------- | ||
call plug#begin('~/.vim/plugins') | ||
Plug 'gruvbox-community/gruvbox' | ||
Plug 'neoclide/coc.nvim', {'branch': 'release'} | ||
Plug 'sheerun/vim-polyglot' | ||
call plug#end() | ||
|
||
filetype on | ||
"---------- Appearance ---------- | ||
set laststatus=2 "show filename in status bar | ||
colorscheme gruvbox | ||
set background=dark | ||
set colorcolumn=80 | ||
highlight ColorColumn ctermbg=0 "80 column color | ||
set linebreak | ||
"set cursorcolumn "highlight column where cursor is | ||
"set cursorline "highlight line under the cursor | ||
|
||
"line number | ||
"---------- Line Number ---------- | ||
set numberwidth=3 "required for showing line & relative line number | ||
set relativenumber "show relative line number | ||
set number | ||
set ruler "status line | ||
set rulerformat=%l,%c%V | ||
|
||
"set spell check | ||
"set spell | ||
"---------- Indentation ----------- | ||
set expandtab | ||
set tabstop=4 | ||
set shiftwidth=4 | ||
set autoindent | ||
set softtabstop=4 "remove tab by backspace even expandtab set | ||
|
||
"au FileType python set omnifunc=pythoncomplete"Complete | ||
let g:SuperTabDefaultCompletionType = "context" | ||
set completeopt=menuone,longest,preview | ||
"tab-spaces visualisation | ||
set list | ||
set listchars=tab:>- | ||
set textwidth=79 "wrap after 79 char | ||
|
||
map <c-n> :NERDTreeToggle<CR> | ||
let g:NERDTreeNodeDelimiter="\t" | ||
map <c-g> :GundoToggle<CR> | ||
"searching | ||
map <leader>a: Ack! | ||
filetype indent on "load file type specific indent files from ~/.vim/indent/XXX.vim | ||
|
||
"goto definition | ||
let g:jedi#goto_definitions_command = "<leader>g" | ||
"---------- Code Formatting --------- | ||
syntax on | ||
set filetype=on | ||
|
||
"hilight cursor col | ||
set t_Co=256 | ||
set colorcolumn=80 "limit 80 cols | ||
"---------- Searching ------------ | ||
set incsearch "incremental search | ||
set ignorecase "ignore case-sensitivity | ||
set smartcase "switch to case-sensitive on Upper case char | ||
set hlsearch | ||
highlight Search ctermbg=yellow ctermfg=black | ||
highlight ColorColumn ctermfg=white | ||
|
||
func StripTrailingWS() | ||
%s/\s\+$//ge | ||
endfunc | ||
|
||
noremap <leader>w :call StripTrailingWS()<CR> | ||
"----------- Mapping ------------- | ||
let mapleader = "," | ||
nnoremap <leader>e :!pylint -E %<CR> | ||
noremap <leader>w :call TrimTrailingWhiteSpaces()<CR> | ||
noremap <leader><space> :nohl<CR> | ||
|
||
autocmd FileType python setlocal et sw=4 ts=4 | ||
set viminfo='20,<1000,s1000 | ||
|
||
" for Mac only | ||
set backspace=indent,eol,start | ||
"----------- Functions ----------- | ||
func TrimTrailingWhiteSpaces() | ||
let l:save = winsaveview() | ||
keeppatterns %s/\s\+$//e | ||
call winrestview(l:save) | ||
endfunc |