Last active
October 24, 2016 11:20
-
-
Save acamino/8d0e96d67409730fdb342d60ba1b2875 to your computer and use it in GitHub Desktop.
Vim Custom Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Quickly toggle between relative and no relative line numbers | |
function! NumberToggle() | |
if(&relativenumber == 1) | |
set norelativenumber | |
else | |
set relativenumber | |
endif | |
endfunc | |
nnoremap <C-L> :call NumberToggle()<CR> | |
" Inline variable | |
function! InlineVariable() | |
let l:original_a = @a | |
" Copy the variable under the cursor under the @a register | |
normal "ayiw | |
normal d2w | |
let l:original_b = @b | |
" Delete the expression into the @b register | |
normal "bd$ | |
normal dd | |
" Find and replace the ocurrence of the variable | |
exec '/\<' . @a . '\>' | |
exec ':.s/\<' . @a . '\>/' . escape(@b, "/") | |
" Restore the original registers contents | |
let @a = l:original_a | |
let @b = l:original_b | |
endfunction | |
nnoremap <LEADER>ri :call InlineVariable()<CR> | |
" Percent-percent expands to directory path | |
cnoremap %% <C-R>=expand('%:h').'/'<CR> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runtime colors/ir_black.vim | |
let g:colors_name = "opal" | |
hi pythonSpaceError guibg=RED ctermbg=RED | |
hi Comment ctermfg=GRAY | |
hi StatusLine ctermfg=WHITE ctermbg=DARKGRAY | |
hi StatusLineNC ctermfg=LIGHTGRAY ctermbg=BLACK | |
hi VertSplit ctermfg=LIGHTGRAY ctermbg=BLACK | |
hi LineNr ctermfg=DARKGRAY | |
hi CursorLine guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=234 | |
hi Function guifg=#FFD2A7 guibg=NONE gui=NONE ctermfg=YELLOW ctermbg=NONE cterm=NONE | |
hi Visual guifg=NONE guibg=#262D51 gui=NONE ctermfg=NONE ctermbg=236 cterm=NONE | |
hi Error guifg=NONE guibg=NONE gui=UNDERCURL ctermfg=16 ctermbg=RED cterm=NONE guisp=#FF6C60 " UNDERCURL color | |
hi ErrorMsg guifg=WHITE guibg=#FF6C60 gui=BOLD ctermfg=16 ctermbg=RED cterm=NONE | |
hi WarningMsg guifg=WHITE guibg=#FF6C60 gui=BOLD ctermfg=16 ctermbg=RED cterm=NONE | |
hi SpellBad guifg=WHITE guibg=#FF6C60 gui=BOLD ctermfg=16 ctermbg=160 cterm=NONE | |
hi Operator guifg=#6699CC guibg=NONE gui=NONE ctermfg=LIGHTBLUE ctermbg=NONE cterm=NONE | |
hi DiffAdd term=REVERSE ctermfg=16 ctermbg=LIGHTGREEN cterm=BOLD | |
hi DiffChange term=REVERSE ctermfg=16 ctermbg=LIGHTBLUE cterm=BOLD | |
hi DiffText term=REVERSE ctermfg=16 ctermbg=LIGHTGRAY cterm=BOLD | |
hi DiffDelete term=REVERSE ctermfg=16 ctermbg=LIGHTRED cterm=BOLD | |
hi PmenuSel ctermbg=156 ctermfg=16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment