uncomment conf
This commit is contained in:
parent
19c2bfcdc5
commit
f64f2a0196
1 changed files with 15 additions and 31 deletions
|
@ -1,48 +1,32 @@
|
||||||
set nocompatible " Required to read a vim (not vi) config correctly
|
" Global settings
|
||||||
set completeopt=preview " Completation mode: preview
|
set nocompatible
|
||||||
|
set completeopt=preview
|
||||||
|
|
||||||
" Vim-airline settings
|
|
||||||
let g:airline_powerline_fonts = 1
|
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
|
||||||
let g:airline_theme='term'
|
|
||||||
let g:airline#extensions#whitespace#enabled = 0
|
|
||||||
|
|
||||||
" Python settings
|
|
||||||
let g:python3_host_prog = '/usr/bin/python3.9'
|
|
||||||
let g:loaded_python_provider = 0
|
|
||||||
|
|
||||||
|
|
||||||
" Default 4 tab spaces
|
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set expandtab
|
set expandtab
|
||||||
" change it based on filetype
|
|
||||||
autocmd Filetype ruby setlocal ts=2 sw=2
|
|
||||||
autocmd Filetype slim setlocal ts=2 sw=2
|
|
||||||
|
|
||||||
" set cindent
|
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
set nu
|
set nu
|
||||||
set hidden
|
set hidden
|
||||||
set noshowmode
|
set noshowmode
|
||||||
" Disabling backups and swap files (cause problem in servers, messy dirs etc.)
|
|
||||||
" You might want to comment this if you are on an unstable system
|
|
||||||
set nobackup
|
set nobackup
|
||||||
set nowritebackup
|
set nowritebackup
|
||||||
set noswapfile
|
set noswapfile
|
||||||
|
|
||||||
" Use Ctrl+Q to close buffer
|
|
||||||
|
" Custom settings and bindings
|
||||||
|
autocmd Filetype ruby setlocal ts=2 sw=2
|
||||||
|
autocmd Filetype slim setlocal ts=2 sw=2
|
||||||
|
filetype plugin indent on
|
||||||
|
|
||||||
noremap <C-q> :bd<CR>
|
noremap <C-q> :bd<CR>
|
||||||
" Map Ctrl+N for NerdTree
|
|
||||||
map <C-n> :NERDTreeToggle<CR>
|
map <C-n> :NERDTreeToggle<CR>
|
||||||
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
||||||
" Map ; to search files (fd)
|
|
||||||
map ; :Files<CR>
|
map ; :Files<CR>
|
||||||
" Map , to match in files (ripgrep)
|
|
||||||
map ' :Rg<CR>
|
map ' :Rg<CR>
|
||||||
" Map /ln to disable highlighting
|
|
||||||
nmap <leader>ln :noh<CR>
|
nmap <leader>ln :noh<CR>
|
||||||
" Windows splitting and movement (move windows with hjkl keys)
|
|
||||||
function! WinMove(key)
|
function! WinMove(key)
|
||||||
let t:curwin = winnr()
|
let t:curwin = winnr()
|
||||||
exec "wincmd ".a:key
|
exec "wincmd ".a:key
|
||||||
|
@ -62,7 +46,7 @@ nnoremap <silent> <C-k> :call WinMove('k')<CR>
|
||||||
nnoremap <silent> <C-l> :call WinMove('l')<CR>
|
nnoremap <silent> <C-l> :call WinMove('l')<CR>
|
||||||
|
|
||||||
|
|
||||||
" Using Plug for plugins
|
" Plugins
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
Plug 'preservim/nerdtree' " NerdTree for browsing directories
|
Plug 'preservim/nerdtree' " NerdTree for browsing directories
|
||||||
|
@ -77,7 +61,7 @@ Plug 'airblade/vim-gitgutter' " Git plugin
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
let g:airline_powerline_fonts = 1
|
||||||
filetype plugin indent on
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
syntax enable
|
let g:airline_theme='term'
|
||||||
|
let g:airline#extensions#whitespace#enabled = 0
|
||||||
|
|
Loading…
Reference in a new issue