From 473751525373ce8df49e4face8642cd923c6339f Mon Sep 17 00:00:00 2001 From: djib Date: Sun, 29 Sep 2019 18:06:21 +0200 Subject: [PATCH] Add .vimrc configuration --- .vimrc | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 ++ 2 files changed, 91 insertions(+) create mode 100644 .vimrc diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..cad6a0e --- /dev/null +++ b/.vimrc @@ -0,0 +1,88 @@ +" Plugin management +set nocompatible +filetype off +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() +Plugin 'VundleVim/Vundle.vim' +" Explorer +Plugin 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +" File search +Plugin 'ctrlpvim/ctrlp.vim' +" Class explorer +Plugin 'majutsushi/tagbar', { 'on': 'TagbarToggle' } +" Status Line +Plugin 'vim-airline/vim-airline' +" Intelligent folding +Plugin 'tmhedberg/SimpylFold' +" Git management +Plugin 'tpope/vim-fugitive' +" Autocomplete for python +Plugin 'davidhalter/jedi-vim', { 'for': 'python' } +" Asynchronous syntax check +Plugin 'dense-analysis/ale' +" Color schemes +Plugin 'jnurmine/Zenburn' +Plugin 'altercation/vim-colors-solarized' +" Code completion using +" Plugin 'ervandew/supertab' + +call vundle#end() +filetype plugin indent on + +" Syntax +syntax enable +let python_highlight_all = 1 +set number +set cursorline +set showmatch +set laststatus=2 " Always display statusline +if has('gui_running') + set background=dark + colorscheme solarized +else + colorscheme zenburn +endif + +" Indentation +set tabstop=4 +set softtabstop=4 +set shiftwidth=0 +set textwidth=79 +set autoindent +set smarttab +autocmd filetype python set expandtab +au BufNewFile,BufRead *.js, *.html, *.css + \ set tabstop=2 + \ set softtabstop=2 + \ set shiftwidth=2 + +" Display +set list +set list listchars=tab:▷⋅,trail:⋅,nbsp:⋅ +set nowrap +set hlsearch +set incsearch +set foldlevel=3 + +" Behaviour +set hidden " Keep previous buffer when opening a new file +set wildmenu " Sexy autocomplete + +" Mappings +let mapleader="," +map h +map j +map k +map l +nnoremap za +nnoremap :!%:p +nmap :NERDTreeToggle +nmap :TagbarToggle + +" Plugin Ale +packloadall +silent! helptags ALL + +" Other Plugin +let g:SimpylFold_docstring_preview=1 +let g:airline#extensions#tabline#enabled=1 diff --git a/README.md b/README.md index e69de29..19e26f9 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,3 @@ +Dotfiles +======== +A repo to share some dotfiles across multiples machines.