mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Update vim, git, tmux, migrate to light theme
This commit is contained in:
parent
72c267b784
commit
04331d3e94
16 changed files with 181 additions and 229 deletions
|
|
@ -1,139 +1,64 @@
|
|||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'Smirnov-O/nten16.vim'
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'Smirnov-O/nten.vim'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'w0rp/ale'
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
call plug#end()
|
||||
|
||||
"== General
|
||||
set termguicolors
|
||||
colorscheme nten16
|
||||
colo nten-light " Color scheme
|
||||
set nu rnu " Line numbers
|
||||
set cursorline " Highlight line by cursor
|
||||
set linebreak wrap " Line wrap
|
||||
set mouse=a mousehide " Mouse
|
||||
set ruler laststatus=0 " Status line
|
||||
set history=500 " Set history size
|
||||
set autoread " Auto read file on change
|
||||
set hidden " Change buffet without warning
|
||||
set visualbell t_vb= " Disable sounds
|
||||
set pumheight=8 " Maximum items in pop up
|
||||
set modeline " Enable modeline
|
||||
set nobk noswf noudf " Swap files
|
||||
set is ic scs " Search
|
||||
set scrolloff=3
|
||||
set enc=utf-8 fenc=utf-8 " Encoding
|
||||
set list listchars=tab:\|·,trail:~,space:·
|
||||
|
||||
" Line numbers
|
||||
set nu rnu
|
||||
|
||||
" Line wrap
|
||||
set linebreak wrap
|
||||
|
||||
" Tabs
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set softtabstop=2
|
||||
" Tab
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set softtabstop=4
|
||||
set smarttab
|
||||
set expandtab
|
||||
set autoindent
|
||||
|
||||
" Status line
|
||||
set ruler laststatus=0
|
||||
"== Netrw file manager
|
||||
let g:netrw_liststyle=3
|
||||
let g:netrw_banner=0
|
||||
let g:netrw_dirhistmax=0
|
||||
|
||||
" Maximux item in popup
|
||||
set pumheight=8
|
||||
|
||||
" Scroll
|
||||
set scrolloff=3
|
||||
|
||||
" Mouse
|
||||
set mouse=a
|
||||
set mousehide
|
||||
set cursorline
|
||||
|
||||
" Encoding
|
||||
set encoding=utf-8
|
||||
set fileencodings=utf-8
|
||||
|
||||
" Backup file & history
|
||||
set nobackup noswapfile noundofile
|
||||
set history=500
|
||||
|
||||
" Search
|
||||
set incsearch
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
" Enable mode line
|
||||
set modeline
|
||||
|
||||
" Auto reload file
|
||||
set autoread
|
||||
|
||||
" Buffer
|
||||
set hidden
|
||||
|
||||
" Space/tab indicator
|
||||
set list listchars=tab:\|·,trail:~,space:·
|
||||
|
||||
" Disable sound
|
||||
set visualbell t_vb=
|
||||
|
||||
|
||||
"== Aliases
|
||||
command! W :w
|
||||
command! Wq :wq
|
||||
command! Term :vs|wincmd L|set nonu nornu|startinsert|cd %:p:h|term
|
||||
command! Prettier :silent !prettier -w %
|
||||
command! Black :silent !black %
|
||||
command! ElmFmt :silent !elm-format % --yes
|
||||
|
||||
|
||||
"== Settings for specific languages
|
||||
autocmd FileType python,elm setlocal ex sw=4 ts=4
|
||||
autocmd FileType javascript,javascriptreact setlocal et sw=2 ts=2
|
||||
autocmd FileType html,css,json,yaml setlocal ex sw=2 ts=2
|
||||
|
||||
|
||||
"== ALE
|
||||
let g:ale_disable_lsp = 1
|
||||
let g:ale_echo_msg_format = '%severity%: %s'
|
||||
|
||||
|
||||
"== NERDTree
|
||||
let g:NERDTreeWinPos = "right"
|
||||
let g:NERDTreeMinimalUI = 1
|
||||
let g:NERDTreeWinSize = 24
|
||||
"== Custom setting for another files
|
||||
au FileType python,elm setlocal ex sw=4 ts=4
|
||||
au FileType javascript,javascriptreact,json,yaml setlocal ex sw=2 ts=2
|
||||
|
||||
"== Custom commands
|
||||
com! Term :vs|winc L|se nu! rnu!|start|term
|
||||
com! Prettier :silent !prettier -w %
|
||||
com! Black :silent !black %
|
||||
com! ElmFmt :silent !elm-format --yes %
|
||||
com! GoFmt :silent !gofmt -w %
|
||||
|
||||
"== Mapping
|
||||
let mapleader=";"
|
||||
|
||||
" NerdTree
|
||||
nnoremap <leader>e :NERDTreeToggle<CR>
|
||||
|
||||
" Terminal
|
||||
tnoremap <Esc> <C-\><C-n>
|
||||
nnoremap <leader>t :Term<CR>
|
||||
|
||||
" Alternative keys
|
||||
nnoremap <C-s> :w<CR>
|
||||
nnoremap <C-n> :tabnew<CR>
|
||||
nnoremap <space> :noh<CR>
|
||||
|
||||
" Window
|
||||
nnoremap <C-h> :wincmd h<CR>
|
||||
nnoremap <C-j> :wincmd j<CR>
|
||||
nnoremap <C-k> :wincmd k<CR>
|
||||
nnoremap <C-l> :wincmd l<CR>
|
||||
|
||||
" Split
|
||||
nnoremap spv :vs<CR>
|
||||
nnoremap sph :sp<CR>
|
||||
nnoremap spk :wincmd K<CR>
|
||||
nnoremap spl :wincmd L<CR>
|
||||
|
||||
" Tab
|
||||
nnoremap tn :tabnew<CR>
|
||||
noremap <A-1> :tabn 1<CR>
|
||||
noremap <A-2> :tabn 2<CR>
|
||||
noremap <A-3> :tabn 3<CR>
|
||||
noremap <A-4> :tabn 4<CR>
|
||||
noremap <A-5> :tabn 5<CR>
|
||||
noremap <A-6> :tabn 6<CR>
|
||||
noremap <A-7> :tabn 7<CR>
|
||||
noremap <A-8> :tabn 8<CR>
|
||||
noremap <A-9> :tabn 9<CR>
|
||||
|
||||
" Buffers
|
||||
nnoremap <leader>j :bnext<CR>
|
||||
nnoremap <leader>k :bprev<CR>
|
||||
nnoremap <leader>w :bdele<CR>
|
||||
nnoremap <leader>b :buffers<CR>
|
||||
nn <C-S> :w<cr>
|
||||
nn <leader>t :Term<cr>
|
||||
nn <space> :noh<cr>
|
||||
nn <leader>j :bn<cr>
|
||||
nn <leader>k :bp<cr>
|
||||
nn <leader>w :bd<cr>
|
||||
nn <C-h> :wincmd h<cr>
|
||||
nn <C-j> :wincmd j<cr>
|
||||
nn <C-k> :wincmd k<cr>
|
||||
nn <C-l> :wincmd l<cr>
|
||||
tno <esc> <c-\><c-n>
|
||||
nn spv :vs<cr>
|
||||
nn sph :sp<cr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue