Compare commits
3 Commits
fdc6ea1ef3
...
7f94c04724
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f94c04724 | |||
| 9bc08347a8 | |||
| b7ca4be5cf |
62
.vimrc
62
.vimrc
@@ -25,9 +25,10 @@ set scrolloff=10 " number of lines to keep a
|
|||||||
set showmatch " show matching brackets when text indicator is over them
|
set showmatch " show matching brackets when text indicator is over them
|
||||||
set splitright " Split to right by default
|
set splitright " Split to right by default
|
||||||
if !has('nvim')
|
if !has('nvim')
|
||||||
set term=xterm-256color " LOTS of colors
|
set term=xterm-256color " LOTS of colors
|
||||||
endif
|
endif
|
||||||
set wildmenu " enhanced command line completion
|
set wildmenu " enhanced command line completion
|
||||||
|
set fillchars=vert:\|,fold:.,diff:-
|
||||||
|
|
||||||
" Text Wrapping
|
" Text Wrapping
|
||||||
set colorcolumn= " disable colorzing <textwidth> column
|
set colorcolumn= " disable colorzing <textwidth> column
|
||||||
@@ -131,6 +132,10 @@ Plug 'bullets-vim/bullets.vim'
|
|||||||
Plug 'vim-airline/vim-airline'
|
Plug 'vim-airline/vim-airline'
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
|
|
||||||
|
" vim-signify
|
||||||
|
" https://github.com/mhinz/vim-signify
|
||||||
|
Plug 'mhinz/vim-signify'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
" ---------------------------------------------------------------------------------------------------------------------
|
" ---------------------------------------------------------------------------------------------------------------------
|
||||||
@@ -164,9 +169,9 @@ let g:bullets_enabled_file_types = [ 'markdown', 'gitcommit' ]
|
|||||||
let g:bullets_outline_levels = ['num', 'abc', 'std*', 'std+', 'std-']
|
let g:bullets_outline_levels = ['num', 'abc', 'std*', 'std+', 'std-']
|
||||||
|
|
||||||
"vim-airline
|
"vim-airline
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
let g:airline_extensions = ['hunks', 'branch', 'tabline']
|
||||||
let g:airline_detect_theme_from_guicolors = 1
|
let g:airline_detect_theme_from_guicolors = 1
|
||||||
|
let g:airline_powerline_fonts = 1
|
||||||
|
|
||||||
" ---------------------------------------------------------------------------------------------------------------------
|
" ---------------------------------------------------------------------------------------------------------------------
|
||||||
" ==> FZF Helper Functions
|
" ==> FZF Helper Functions
|
||||||
@@ -225,31 +230,14 @@ let g:fzf_action = {
|
|||||||
\ 'ctrl-l': function('PasteFzfWikiLink')
|
\ 'ctrl-l': function('PasteFzfWikiLink')
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" ---------------------------------------------------------------------------------------------------------------------
|
|
||||||
" ==> Colors
|
|
||||||
" Term GUI Colors
|
|
||||||
" colorscheme replaced by ~/.vimcustom
|
|
||||||
" If there is a file at ~/.vimcustom, the colorscheme defined in that file
|
|
||||||
" will be applied. If not, colorscheme defaults to 'darkburn'
|
|
||||||
|
|
||||||
" cursorcolumn
|
|
||||||
hi cursorcolumn cterm=NONE ctermbg=black ctermfg=white
|
|
||||||
" visual mode colors
|
|
||||||
hi visual cterm=NONE ctermbg=lightyellow ctermfg=black
|
|
||||||
|
|
||||||
set fillchars=vert:\|,fold:.,diff:-
|
|
||||||
" In split windows - active buffer status bar is green, inactive is yellow
|
|
||||||
hi StatusLine ctermfg=white ctermbg=darkgreen cterm=bold
|
|
||||||
hi StatusLineNC ctermfg=darkgray ctermbg=gray cterm=none
|
|
||||||
|
|
||||||
" ---------------------------------------------------------------------------------------------------------------------
|
" ---------------------------------------------------------------------------------------------------------------------
|
||||||
" => Keymaps: Highlights
|
" => Keymaps: Highlights
|
||||||
|
|
||||||
" <leader><space> to turn off search highlight
|
" <F6> to toggle search highlight
|
||||||
nnoremap <leader><space> :nohls <enter>
|
nnoremap <F6> :nohls <enter>
|
||||||
|
|
||||||
" <leader>C to toggle row/column highlight
|
" <F7> to toggle row/column highlight
|
||||||
nnoremap <leader>C :set cursorline! cursorcolumn!<CR>
|
nnoremap <F7> :set cursorline! cursorcolumn!<CR>
|
||||||
|
|
||||||
" ---------------------------------------------------------------------------------------------------------------------
|
" ---------------------------------------------------------------------------------------------------------------------
|
||||||
" ==> Keymaps: Buffers & Panes
|
" ==> Keymaps: Buffers & Panes
|
||||||
@@ -273,9 +261,6 @@ nnoremap <leader>c :bd <enter>
|
|||||||
" <c-s> to save buffer
|
" <c-s> to save buffer
|
||||||
nnoremap <c-s> :w<CR>
|
nnoremap <c-s> :w<CR>
|
||||||
|
|
||||||
" <c-x> to bring up the copy buffer
|
|
||||||
noremap <c-x> "+
|
|
||||||
|
|
||||||
" <alt>-arrow keys to navigate panes
|
" <alt>-arrow keys to navigate panes
|
||||||
" UP
|
" UP
|
||||||
map <esc>[1;3A <c-w><c-k>
|
map <esc>[1;3A <c-w><c-k>
|
||||||
@@ -305,7 +290,7 @@ nnoremap <leader>f :call fzf#run(fzf#vim#with_preview(fzf#wrap({'source': 'find
|
|||||||
nnoremap <leader>w :execute "if &wrap\n set nowrap\nelse\n set wrap linebreak\nendif"<CR>
|
nnoremap <leader>w :execute "if &wrap\n set nowrap\nelse\n set wrap linebreak\nendif"<CR>
|
||||||
|
|
||||||
" Toggle line numbers
|
" Toggle line numbers
|
||||||
nnoremap <leader>n :set number! relativenumber!<CR>
|
nnoremap <leader>n :set number! relativenumber! <CR>
|
||||||
|
|
||||||
" ---------------------------------------------------------------------------------------------------------------------
|
" ---------------------------------------------------------------------------------------------------------------------
|
||||||
" ==> Keymaps: Text bubbling (http://vimcasts.org/episodes/bubbling-text/)
|
" ==> Keymaps: Text bubbling (http://vimcasts.org/episodes/bubbling-text/)
|
||||||
@@ -373,18 +358,15 @@ hi clear SpellBad
|
|||||||
hi clear SpellCap
|
hi clear SpellCap
|
||||||
hi clear SpellLocal
|
hi clear SpellLocal
|
||||||
hi clear SpellRare
|
hi clear SpellRare
|
||||||
hi SpellCap cterm=underline ctermbg=none ctermfg=magenta
|
hi SpellCap cterm=underline ctermbg=none
|
||||||
hi SpellBad cterm=underline ctermbg=none ctermfg=red
|
hi SpellBad cterm=underline ctermbg=none
|
||||||
hi SpellLocal cterm=underline ctermbg=none ctermfg=gray
|
hi SpellLocal cterm=underline ctermbg=none
|
||||||
hi SpellRare cterm=underline ctermbg=none ctermfg=gray
|
hi SpellRare cterm=underline ctermbg=none
|
||||||
|
|
||||||
" ---------------------------------------------------------------------------------------------------------------------
|
" ---------------------------------------------------------------------------------------------------------------------
|
||||||
" ==> Templates: markdown documents with frontmatter (.md)
|
" ==> Templates: markdown documents with frontmatter (.md)
|
||||||
|
|
||||||
autocmd BufNewFile *.md so $HOME/.vim/templates/mdfm
|
autocmd BufNewFile *.md so $HOME/.vim/templates/mdfm
|
||||||
"autocmd BufNewFile *.md %s/filename:.*/s//filename:\=expand('%:t:r')
|
|
||||||
"autocmd BufNewFile *.md %s/filename:.*/\='filename: '.expand('%:t:r')
|
|
||||||
"autocmd BufNewFile *.md exe "g/^filename:.*/s//filename: " .expand('%:t:r')
|
|
||||||
autocmd BufNewFile *.md exe "g/^filecreated:.*/s//filecreated: " .strftime("%Y-%m-%d")
|
autocmd BufNewFile *.md exe "g/^filecreated:.*/s//filecreated: " .strftime("%Y-%m-%d")
|
||||||
autocmd BufNewFile *.md exe "normal Go"
|
autocmd BufNewFile *.md exe "normal Go"
|
||||||
autocmd BufWritePre,filewritepre *.md execute "normal! ma"
|
autocmd BufWritePre,filewritepre *.md execute "normal! ma"
|
||||||
@@ -415,13 +397,9 @@ nnoremap ,begend :-1read $HOME/.vim/templates/begend<CR>jA
|
|||||||
nnoremap ,sh :0read $HOME/.vim/templates/sh<CR> <bar> :1<CR>dd <bar> :4%s/filename/\=expand('%:t')/g<CR>
|
nnoremap ,sh :0read $HOME/.vim/templates/sh<CR> <bar> :1<CR>dd <bar> :4%s/filename/\=expand('%:t')/g<CR>
|
||||||
|
|
||||||
" section readinglist header
|
" section readinglist header
|
||||||
"nnoremap ,rl :0read $HOME/.vim/templates/readinglist<CR> <bar> :1<CR>dd $
|
|
||||||
"nnoremap ,rl :0read $HOME/.vim/templates/rlfm<CR> <bar>zR<CR> <bar> :1<CR>dd :%s/^filename:/\="filename: " . expand('%:t:r')/g<CR>
|
|
||||||
nnoremap ,rl :0read $HOME/.vim/templates/rlfm<CR> <bar>zR<CR> <bar> :1<CR>dd
|
nnoremap ,rl :0read $HOME/.vim/templates/rlfm<CR> <bar>zR<CR> <bar> :1<CR>dd
|
||||||
|
|
||||||
" section markdown file header
|
" section markdown file header
|
||||||
"nnoremap ,md :0read $HOME/.vim/templates/md<CR> <bar> :1<CR>dd <bar> :%s/filename/\=expand('%:t:r')/g<CR>
|
|
||||||
"nnoremap ,md :0read $HOME/.vim/templates/mdfm<CR> <bar>zR<CR> <bar> :1<CR>dd :%s/^filename:/\="filename: " . expand('%:t:r')/g<CR>
|
|
||||||
nnoremap ,md :0read $HOME/.vim/templates/mdfm<CR> <bar>zR<CR> <bar> :1<CR>dd
|
nnoremap ,md :0read $HOME/.vim/templates/mdfm<CR> <bar>zR<CR> <bar> :1<CR>dd
|
||||||
|
|
||||||
" ---------------------------------------------------------------------------------------------------------------------
|
" ---------------------------------------------------------------------------------------------------------------------
|
||||||
@@ -437,6 +415,12 @@ autocmd FileType netrw setl bufhidden=delete
|
|||||||
autocmd BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=manual
|
autocmd BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=manual
|
||||||
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
|
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
|
||||||
|
|
||||||
|
" ---------------------------------------------------------------------------------------------------------------------
|
||||||
|
" ==> Colors
|
||||||
|
" Term GUI Colors
|
||||||
|
" colorscheme replaced by ~/.vimcustom
|
||||||
|
" If there is a file at ~/.vimcustom, the colorscheme defined in that file
|
||||||
|
" will be applied. If not, colorscheme defaults to 'darkburn'
|
||||||
" ---------------------------------------------------------------------------------------------------------------------
|
" ---------------------------------------------------------------------------------------------------------------------
|
||||||
" ==> Source Local Customizations and Set Colorscheme
|
" ==> Source Local Customizations and Set Colorscheme
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user