dot

packages and services management
Log | Files | Refs | README

commit a611d448bc7ca8125c0cbca6a5cee5ebaa9af641
parent 0e05859f9dba84c60a43d2cf064f0f9b748696d4
Author: josuah <mail@josuah.net>
Date:   Wed, 14 Dec 2016 17:53:29 +0000

Cleaned vimrc

Diffstat:
A.vim/vimrc | 121+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D.vimrc | 143-------------------------------------------------------------------------------
2 files changed, 121 insertions(+), 143 deletions(-)

diff --git a/.vim/vimrc b/.vim/vimrc @@ -0,0 +1,121 @@ +" Using vim's features rather than plugins 2016-12-14 +" +" . __ _ _ +" \/ | ||| | (_ +" +"_______________________________________________________________________________ + + +syntax off +filetype plugin on + + +" Options +"_______________________________________________________________________________ + +" Completion +set omnifunc=syntaxcomplete#Complete +set wildmenu +set wildmode=longest:full,full + +" indentation +set autoindent +set copyindent + +" statusline +set laststatus=0 +set showcmd +set showmode +set ruler +set rulerformat=%30(%3m%=%l:%-8(%c%V%)\ %P%) + +" searching +set smartcase +set ignorecase +set showmatch +set incsearch + +" interface +set list +set listchars=tab:\ \ ,trail:-,nbsp:-,extends:>,precedes:< +set scrolloff=3 +set number +set numberwidth=8 +set cursorline +set nowrap +let &colorcolumn=join(range(81,90),",") + +" backup +set directory=~/.vim// +set backupdir=~/.vim// +set undodir=~/.vim// + +" editing +set virtualedit=block +set formatprg=fmt + +" buffers +set hidden + +" compilation +set showfulltag + + +" Mappings +"_______________________________________________________________________________ + +let mapleader = ' ' +nmap <Leader> : +nmap Y y$ +vmap Y y$ +imap jk <Esc> +cmap jk <C-f> + +" (c)hange (o)ption (...) +nmap col :set list ! \| set list ?<CR> +nmap con :set number ! \| set number ?<CR> +nmap cor :set relativenumber ! \| set number ?<CR> +nmap cop :set paste ! \| set paste ?<CR> +nmap coh :set hlsearch ! \| set hlsearch ?<CR> +nmap coc :set cursorcolumn ! \| set cursorcolumn ?<CR> +nmap cov :set ve=<C-r>=(&ve =~# "all") ? 'block' : 'all'<CR><CR>:set ve ?<CR> +nmap cos :if exists("g:syntax_on") \| sy off \| else \| sy enable \| end<CR> +nmap cot :set tw=<C-r>=(&tw != "0" ) ? '0' : '75' <CR> <CR>:set tw ?<CR> + +" editing +nmap [<Leader> mzO<Esc>k`z<C-e> +nmap ]<Leader> mzo<Esc>k`z + +" parentheses +vmap <Leader>p myomzr\|`zlhr\`ylhr/ + + +" Highlights +"_______________________________________________________________________________ + +" interface +highlight nontext cterm=bold ctermfg=1 +highlight specialkey cterm=bold ctermfg=0 +highlight cursorline cterm=none ctermbg=none +highlight cursorcolumn cterm=bold ctermfg=1 ctermbg=none +highlight cursorlinenr cterm=bold ctermfg=7 +highlight colorcolumn cterm=none ctermfg=1 ctermbg=none +highlight linenr cterm=bold ctermfg=0 +highlight statusline cterm=bold ctermfg=7 +highlight statuslinenc cterm=bold ctermfg=7 +highlight user1 cterm=bold ctermfg=7 +highlight modemsg cterm=bold ctermfg=1 ctermbg=0 +highlight wildmenu cterm=none ctermfg=0 ctermbg=1 +highlight vertsplit cterm=none ctermfg=7 ctermbg=none +highlight incsearch cterm=none ctermfg=0 ctermbg=6 +highlight visual cterm=none ctermfg=0 ctermbg=7 + +" code +highlight comment cterm=bold ctermfg=0 +highlight statement cterm=bold ctermfg=none +highlight constant cterm=none ctermfg=grey +highlight type cterm=none ctermfg=7 +highlight preproc cterm=none ctermfg=7 +highlight special cterm=bold ctermfg=0 +highlight identifier cterm=none ctermfg=7 +highlight number cterm=bold ctermfg=7 diff --git a/.vimrc b/.vimrc @@ -1,143 +0,0 @@ -" Using vim's features rather than plugins 2016-11-27 -" -" . __ _ _ -" \/ | ||| | (_ -" -"_______________________________________________________________________________ - - -syntax off -filetype plugin on - - -" Options -"_______________________________________________________________________________ - -" Completion -set omnifunc=syntaxcomplete#Complete -set wildmenu -set wildmode=longest:full,full - -" indentation -set autoindent -set copyindent - -" statusline -set laststatus=0 -set showcmd -set showmode -set ruler -set rulerformat=%30(%3m%=%l:%-8(%c%V%)\ %P%) - -" searching -set smartcase -set ignorecase -set showmatch -set incsearch - -" interface -set list -set listchars=tab:\ \ ,trail:-,nbsp:-,extends:>,precedes:< -set scrolloff=3 -set number -set numberwidth=8 -set cursorline -set nowrap -let &colorcolumn=join(range(81,90),",") - -" backup -set directory=~/.cache/vim// -set backupdir=~/.cache/vim// -set undodir=~/.cache/vim// -set viminfo+=n~/.cache/vim/viminfo - -" editing -set virtualedit=block -set formatprg=fmt - -" buffers -set hidden - -" compilation -set showfulltag - - -" Mappings -"_______________________________________________________________________________ - -let mapleader = ' ' -nmap <Leader> : -nmap Y y$ -vmap Y y$ -imap jk <Esc> -cmap jk <C-f> - -" (c)hange (o)ption (...) -nmap col :set list ! \| set list ?<CR> -nmap con :set number ! \| set number ?<CR> -nmap cor :set relativenumber ! \| set number ?<CR> -nmap cop :set paste ! \| set paste ?<CR> -nmap coh :set hlsearch ! \| set hlsearch ?<CR> -nmap coc :set cursorcolumn ! \| set cursorcolumn ?<CR> -nmap cov :set ve=<C-r>=(&ve =~# "all") ? 'block' : 'all'<CR><CR>:set ve ?<CR> -nmap cos :if exists("g:syntax_on") \| sy off \| else \| sy enable \| end<CR> -nmap cot :set tw=<C-r>=(&tw != "0" ) ? '0' : '75' <CR> <CR>:set tw ?<CR> - -" editing -nmap [<Leader> mzO<Esc>k`z<C-e> -nmap ]<Leader> mzo<Esc>k`z - -" parentheses -vmap <Leader>p myomzr\|`zlhr\`ylhr/ - - -" Abbreviations -"_______________________________________________________________________________ - -iabbrev -_ <Esc>80a-<Esc>a -iabbrev =_ <Esc>80a=<Esc>a - - -" Highlights -"_______________________________________________________________________________ - -" interface -highlight nontext cterm=bold ctermfg=1 -highlight specialkey cterm=bold ctermfg=0 -highlight cursorline cterm=none ctermbg=none -highlight cursorcolumn cterm=bold ctermfg=1 ctermbg=none -highlight cursorlinenr cterm=bold ctermfg=7 -highlight colorcolumn cterm=none ctermfg=1 ctermbg=none -highlight linenr cterm=bold ctermfg=0 -highlight statusline cterm=bold ctermfg=7 -highlight statuslinenc cterm=bold ctermfg=7 -highlight user1 cterm=bold ctermfg=7 -highlight modemsg cterm=bold ctermfg=1 ctermbg=0 -highlight wildmenu cterm=none ctermfg=0 ctermbg=1 -highlight vertsplit cterm=none ctermfg=7 ctermbg=none -highlight incsearch cterm=none ctermfg=0 ctermbg=6 -highlight visual cterm=none ctermfg=0 ctermbg=7 - -" code -highlight comment cterm=bold ctermfg=0 -highlight statement cterm=bold ctermfg=none -highlight constant cterm=none ctermfg=grey -highlight type cterm=none ctermfg=7 -highlight preproc cterm=none ctermfg=7 -highlight special cterm=bold ctermfg=0 -highlight identifier cterm=none ctermfg=7 -highlight number cterm=bold ctermfg=7 - - -" Autocommands -"_______________________________________________________________________________ - -autocmd vimenter * :silent !mkdir -p ~/.cache/vim/ -autocmd winenter * :file - - -" Plugins -"_______________________________________________________________________________ - -" undotree -nmap <Leader>u :UndotreeToggle<CR>