vim: cleanup

This commit is contained in:
2019-01-08 19:39:18 +02:00
parent c9c82a1c5d
commit b01271b349
2 changed files with 38 additions and 41 deletions

2
macos
View File

@@ -29,7 +29,7 @@ sudo pmset -a standbydelay 86400
sudo nvram SystemAudioVolume=" " sudo nvram SystemAudioVolume=" "
# Disable transparency in the menu bar and elsewhere on Yosemite # Disable transparency in the menu bar and elsewhere on Yosemite
defaults write com.apple.universalaccess reduceTransparency -bool true # defaults write com.apple.universalaccess reduceTransparency -bool true
# Set sidebar icon size to medium # Set sidebar icon size to medium
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2

View File

@@ -15,8 +15,8 @@ set nocompatible
set encoding=utf-8 set encoding=utf-8
set fileencoding=utf-8 set fileencoding=utf-8
" Quantity of comand line entries vim have to remember " History length
set history=500 set history=1000
" Remap the <leader> to , " Remap the <leader> to ,
let mapleader="," let mapleader=","
@@ -437,6 +437,7 @@ let g:lightline =
\ 'ctrlpmark': 'LightlineCtrlP', \ 'ctrlpmark': 'LightlineCtrlP',
\ }, \ },
\ } \ }
let g:lightline.mode_map = let g:lightline.mode_map =
\ { \ {
\ 'n' : ' N ', \ 'n' : ' N ',
@@ -502,17 +503,17 @@ endif
" -> Colors & Fonts " -> Colors & Fonts
" ======================================================== " ========================================================
" solarized is love solarized is life " Solarized is love solarized is life
colorscheme solarized colorscheme solarized
set background=dark set background=dark
" set guifont=Source\ Code\ Pro:h16 set guifont=Source\ Code\ Pro:h16
if has('gui_running') if has('gui_running')
set guifont=Menlo:h14 set guifont=Menlo:h14
set guioptions-=T " remove toolbar set guioptions-=T " Remove toolbar
set guioptions-=m " remove menubar set guioptions-=m " Remove menubar
set guioptions+=LlRrb " remove set guioptions+=LlRrb " Remove
set guioptions-=LlRrb " scrollbars set guioptions-=LlRrb " Scrollbars
set t_Co=256 set t_Co=256
else else
" Disable Background Color Erase (BCE) so that color schemes " Disable Background Color Erase (BCE) so that color schemes
@@ -673,9 +674,6 @@ set shiftwidth=2
" Spaces " Spaces
set expandtab set expandtab
" Don't write end of file
" set noeol
" ======================================================== " ========================================================
@@ -759,7 +757,7 @@ nnoremap Y y$
" vv/ss for splits " vv/ss for splits
nnoremap <silent>vv <c-w>v nnoremap <silent>vv <c-w>v
" nnoremap <silent>ss <c-w>s nnoremap <silent>ss <c-w>s
" Highlight VCS conflict markers " Highlight VCS conflict markers
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
@@ -773,10 +771,11 @@ imap <C-e> <C-y>, <CR>
" Allow the . to execute once for each line of a visual selection " Allow the . to execute once for each line of a visual selection
vnoremap . :normal .<CR> vnoremap . :normal .<CR>
" Makes more sense
nnoremap H ^ nnoremap H ^
nnoremap L $ nnoremap L $
" Avoid entering Ex mode by pressing gQ (Q is remapped below) " Avoid entering Ex mode by pressing gQ
nnoremap gQ <nop> nnoremap gQ <nop>
" I don't use it " I don't use it
@@ -796,12 +795,12 @@ nmap \\\ <Plug>CommentaryLine
nmap \\u <Plug>CommentaryUndo nmap \\u <Plug>CommentaryUndo
" git " git
noremap <Leader>ga :Gwrite<CR> noremap <leader>ga :Gwrite<CR>
noremap <Leader>gc :Gcommit<CR> noremap <leader>gc :Gcommit<CR>
noremap <Leader>gp :Gpush<CR> noremap <leader>gp :Gpush<CR>
noremap <Leader>gup :Gpull<CR> noremap <leader>gup :Gpull<CR>
noremap <Leader>gs :Gstatus<CR> noremap <leader>gs :Gstatus<CR>
noremap <Leader>gd :Gvdiff<CR> noremap <leader>gd :Gvdiff<CR>
" CtrlP -> fzf " CtrlP -> fzf
nnoremap <C-p> :Files<Cr> nnoremap <C-p> :Files<Cr>
@@ -820,11 +819,10 @@ nnoremap <C-p> :Files<Cr>
" REMINDERS: " REMINDERS:
" m -- ruby method motion (e.g. cim) " m -- ruby method motion (e.g. cim)
" i -- indentation motion (e.g. dai) " i -- indentation motion (e.g. dai)
" gx -- opens url in browser
" ctrl + e -- emmet
" ctrl + n -- vim-multiple-cursor
" EXPERIMENTAL: " EXPERIMENTAL:
" Color under cursor
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR> map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
" Color name (:help cterm-colors) or ANSI code " Color name (:help cterm-colors) or ANSI code
@@ -837,24 +835,23 @@ let g:limelight_default_coefficient = 0.7
" Set it to -1 not to overrule hlsearch " Set it to -1 not to overrule hlsearch
let g:limelight_priority = -1 let g:limelight_priority = -1
" Goyo {{ " Goyo
" Toggle distraction-free mode " Toggle distraction-free mode
nnoremap <silent> <leader>g :Goyo<cr> nnoremap <silent> <leader>g :Goyo<cr>
fun! s:goyoEnter() fun! s:goyoEnter()
set scrolloff=999 " Keep the edited line vertically centered set scrolloff=999 " Keep the edited line vertically centered
set wrap set wrap
set noshowcmd set noshowcmd
Limelight Limelight
endf endf
fun! s:goyoLeave() fun! s:goyoLeave()
set showcmd set showcmd
set nowrap set nowrap
set scrolloff=5 set scrolloff=5
Limelight! Limelight!
endf endf
autocmd! User GoyoEnter nested call <sid>goyoEnter() autocmd! User GoyoEnter nested call <sid>goyoEnter()
autocmd! User GoyoLeave nested call <sid>goyoLeave() autocmd! User GoyoLeave nested call <sid>goyoLeave()
" }}