more changes

This commit is contained in:
Vasili Svirydau
2017-11-16 15:53:57 -08:00
parent bef25fc946
commit 3f39ff71f0
5 changed files with 50 additions and 36 deletions

View File

@@ -12,18 +12,20 @@ if(have_plug)
call plug#begin(vim_files . '/plugged') call plug#begin(vim_files . '/plugged')
Plug 'tpope/vim-sensible' " Sensible defaults for vim Plug 'tpope/vim-sensible' " Sensible defaults for vim
Plug 'w0ng/vim-hybrid' " Hybrid colorscheme
Plug 'vim-airline/vim-airline' " Status bar
Plug 'vim-airline/vim-airline-themes' " Status bar themes
Plug 'ivyl/vim-bling' " blink search results
Plug 'ctrlpvim/ctrlp.vim' " Fuzzy search Plug 'ctrlpvim/ctrlp.vim' " Fuzzy search
Plug 'editorconfig/editorconfig-vim' " EditorConfig.org support
Plug 'ivyl/vim-bling' " blink search results
Plug 'rking/ag.vim' " Silver Searcher Support
Plug 'tacahiroy/ctrlp-funky' " Fuzzy in-buffer search Plug 'tacahiroy/ctrlp-funky' " Fuzzy in-buffer search
Plug 'tommcdo/vim-lion' " Align stuff Plug 'tommcdo/vim-lion' " Align stuff
Plug 'tpope/vim-commentary' " Commenting
Plug 'tpope/vim-fugitive' " Work with git repos Plug 'tpope/vim-fugitive' " Work with git repos
Plug 'tpope/vim-surround' " Surround with quotes Plug 'tpope/vim-surround' " Surround with quotes
Plug 'rking/ag.vim' " Silver Searcher Support Plug 'vim-airline/vim-airline' " Status bar
Plug 'tpope/vim-commentary' " Commenting Plug 'vim-airline/vim-airline-themes' " Status bar themes
" Plug 'vimwiki/vimwiki' " http://vimwiki.github.io/ Plug 'vimwiki/vimwiki' " http://vimwiki.github.io/
Plug 'w0ng/vim-hybrid' " Hybrid colorscheme
" Language " Language
if executable('rails') if executable('rails')
@@ -37,6 +39,8 @@ if(have_plug)
Plug 'quramy/vim-js-pretty-template' " Syntax highlight inside template strings Plug 'quramy/vim-js-pretty-template' " Syntax highlight inside template strings
Plug 'quramy/tsuquyomi' " Language server support for TypeScript Plug 'quramy/tsuquyomi' " Language server support for TypeScript
Plug 'heavenshell/vim-jsdoc' " Generate JSDoc comments
" Quality of life " Quality of life
Plug 'edkolev/tmuxline.vim' Plug 'edkolev/tmuxline.vim'
@@ -55,4 +59,10 @@ if(have_plug)
endif endif
endif endif
let g:loaded_netrwPlugin = 1
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#ale#enabled = 1
let g:ale_sign_column_always = 1
let g:ale_sign_error = ''
let g:ale_sign_warning = ''

View File

@@ -7,19 +7,19 @@ set visualbell
set wildmode=full set wildmode=full
set background=dark set background=dark
silent! colorscheme hybrid silent! colorscheme hybrid
let mapleader = '\' "Set <leader> before any key remapping " let mapleader = '\' "Set <leader> before any key remapping
set hlsearch "highlight search results set hlsearch "highlight search results
set ignorecase "ignore capitalization set ignorecase "ignore capitalization
set smartcase set smartcase
set cursorline "highlight current line set cursorline "highlight current line
set listchars=tab:▸\ ,eol set listchars=tab:▸\ ,eol
"Invisible character colors "Invisible character colors
highlight NonText guifg=#4a4a59 " highlight NonText guifg=#4a4a59
highlight SpecialKey guifg=#4a4a59 " highlight SpecialKey guifg=#4a4a59
"tab settings "tab settings
set shiftwidth=4
set tabstop=4
set expandtab set expandtab
set shiftwidth=4
set softtabstop=4
set backspace=2 "set sane backspace behaviour set backspace=2 "set sane backspace behaviour
@@ -44,7 +44,7 @@ imap jk <Esc>
set completeopt=longest,menu,menuone set completeopt=longest,menu,menuone
" Stolen from maralla/dotvim " Stolen from maralla/dotvim
function! EnsureExists(path) function! EnsureExists(path) abort
if !isdirectory(expand(a:path)) if !isdirectory(expand(a:path))
call mkdir(expand(a:path)) call mkdir(expand(a:path))
endif endif

View File

@@ -1,36 +1,32 @@
"open config with \r "open config with \r
nmap <leader>r :e $MYVIMRC<cr> noremap <leader>r :edit $MYVIMRC<cr>
nmap <silent><leader>w :up<cr> noremap <silent><leader>w :update<cr>
imap <silent><leader>w <Esc>:up<cr>a inoremap <silent><leader>w <Esc>:update<cr>a
cmap w!! w !sudo tee % >/dev/null cmap w!! w !sudo tee % >/dev/null
cmap eh e %:h/
"Remove search highlight when <Esc> is pressed "Remove search highlight when <Esc> is pressed
nnoremap <silent> <Esc><Esc> <Esc>:nohlsearch<CR><Esc> nnoremap <silent> <Esc><Esc> <Esc>:nohlsearch<CR><Esc>
"toggle whitespace "toggle whitespace
nmap <leader>l :set list!<cr> noremap <leader>l :set list!<cr>
" noremap <silent> <leader>R :! echo reload \| nc -w 1 localhost 32000<cr><cr> " noremap <silent> <leader>R :! echo reload \| nc -w 1 localhost 32000<cr><cr>
noremap <silent><leader>R :! tmux send-keys -t right "up" C-m<cr><cr> noremap <silent><leader>R :! tmux send-keys -t right "up" C-m<cr><cr>
"press space in normal mode to center screen "press space in normal mode to center screen
nmap <space> zz noremap <space> zz
nmap <leader>] :bn<cr> noremap <leader>] :bn<cr>
nmap <leader>[ :bp<cr> noremap <leader>[ :bp<cr>
nmap <leader>d :bd<cr> noremap <leader>d :bd<cr>
if(exists("g:loaded_ale"))
nmap <leader>e[ <Plug>(ale_previous_wrap) nmap <leader>e[ <Plug>(ale_previous_wrap)
nmap <leader>e] <Plug>(ale_next_wrap) nmap <leader>e] <Plug>(ale_next_wrap)
endif
let g:tsuquyomi_javascript_support = 1 let g:tsuquyomi_javascript_support = 1
if(exists("g:loaded_tsuquyomi")) noremap <leader>p :echo tsuquyomi#hint()<cr>
nmap <leader>p :echo tsuquyomi#hint()<cr>
endif
let g:ctrlp_funky_syntax_highlight = 1 let g:ctrlp_funky_syntax_highlight = 1
if(exists("g:loaded_ctrlp_funky"))
nnoremap <leader>f :CtrlPFunky<CR> nnoremap <leader>f :CtrlPFunky<CR>
endif

View File

@@ -1,6 +1,18 @@
if has("autocmd") if has("autocmd")
filetype plugin indent on filetype plugin indent on
augroup InvisibleCharsHighlight
au!
autocmd ColorScheme * :call ResetColors()
function! ResetColors()
"Invisible character colors
highlight NonText guifg=#4a4a59
highlight SpecialKey guifg=#4a4a59
endfun
augroup END
augroup CleanWhitespace augroup CleanWhitespace
au! au!
autocmd BufWritePre * :call <SID>StripTrailingWhitespace() autocmd BufWritePre * :call <SID>StripTrailingWhitespace()

4
vimrc
View File

@@ -13,8 +13,4 @@ call SourceConfig("02-general.vim")
call SourceConfig("03-mappings.vim") call SourceConfig("03-mappings.vim")
call SourceConfig("04-autocmds.vim") call SourceConfig("04-autocmds.vim")
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#ale#enabled = 1
unlet g:vim_files unlet g:vim_files