vim: cleanup
This commit is contained in:
2
macos
2
macos
@@ -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
|
||||||
|
|||||||
45
vim/.vimrc
45
vim/.vimrc
@@ -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,7 +835,7 @@ 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>
|
||||||
|
|
||||||
@@ -857,4 +855,3 @@ let g:limelight_priority = -1
|
|||||||
|
|
||||||
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()
|
||||||
" }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user