Share some of my dotfiles across configurations
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

93 satır
2.2 KiB

" Plugin management
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
" Status Line
Plugin 'vim-airline/vim-airline'
" Explorer
Plugin 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
" File search
Plugin 'ctrlpvim/ctrlp.vim'
" Class explorer
Plugin 'majutsushi/tagbar', { 'on': 'TagbarToggle' }
" Auto completion using <Tab>
Plugin 'ervandew/supertab'
" Syntax check
Plugin 'dense-analysis/ale'
" Code completion and refactoring (Python)
Plugin 'davidhalter/jedi-vim'
" Intelligent folding
Plugin 'tmhedberg/SimpylFold'
" Git management
Plugin 'tpope/vim-fugitive'
" Markdown
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
" Color schemes
Plugin 'morhetz/gruvbox'
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
set background=dark
let g:gruvbox_contrast_dark='hard'
if filereadable( expand("$HOME/.vim/bundle/gruvbox/colors/gruvbox.vim") )
colorscheme gruvbox
endif
" Indentation
set tabstop=4
set softtabstop=4
set shiftwidth=0
" set textwidth=79
set autoindent
set smarttab
autocmd filetype python set expandtab
" Display
set list
set list listchars=tab:\|·,trail:⋅,nbsp:⋅
" set nowrap
set hlsearch
set incsearch
set foldlevel=2
set colorcolumn=80
" Behaviour
set hidden " Keep previous buffer when opening a new file
set wildmenu " Sexy autocomplete
set wildmode=longest:full,full
set wildignorecase
" Uncomment the following to have Vim jump to the last position when
" reopening a file
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" Mappings
let mapleader=","
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
nnoremap <space> za
nmap <F5> :w<CR>:!clear;python3 %<CR>
nmap <F6> :w<CR>:!clear;pipenv run python3 %<CR>
nmap <F7> :NERDTreeToggle<CR>
nmap <F8> :TagbarToggle<CR>
nmap <F10> :!%:p<CR>
nmap <C-Up> :lprevious<CR>
nmap <C-Down> :lnext<CR>
" Plugin config
let g:SimpylFold_docstring_preview=1
let g:airline#extensions#tabline#enabled=1
let g:jedi#completions_enabled = 1
let g:jedi#smart_auto_mappings = 1