Update skel configs

This commit is contained in:
natemaia 2019-08-18 00:50:07 -07:00
parent 9561ee8f95
commit feaa8bb41e
4 changed files with 21 additions and 330 deletions

View File

@ -69,22 +69,3 @@ URxvt.tabbed.tabbar-bg: 16
URxvt.tabbed.tab-fg: 15 URxvt.tabbed.tab-fg: 15
URxvt.tabbed.tab-bg: 4 URxvt.tabbed.tab-bg: 4
URxvt*buffered: false URxvt*buffered: false
! UXTerm
UXTerm*termName: xterm-256color
UXTerm*cursorColor: white
UXTerm*VT100.geometry: 90x34
UXTerm*font: monospace
UXTerm*faceSize: 11
UXTerm*dynamicColors: true
UXTerm*utf8: 2
UXTerm*eightBitInput: true
UXTerm*saveLines: 10000
UXTerm*scrollKey: true
UXTerm*scrollTtyOutput: false
UXTerm*scrollBar: false
UXTerm*rightScrollBar: false
UXTerm*jumpScroll: true
UXTerm*multiScroll: true
UXTerm*toolBar: false

View File

@ -5,36 +5,33 @@ scriptencoding utf8
" Arch defaults " Arch defaults
runtime! archlinux.vim runtime! archlinux.vim
" create the backup and undo directories
silent! call mkdir($HOME.'/.config/nvim/undo', 'p')
silent! call mkdir($HOME.'/.config/nvim/backup', 'p')
" leader key " leader key
let g:mapleader = "\<Space>" let g:mapleader = "\<Space>"
" system clipboard (requires +clipboard)
set clipboard^=unnamed,unnamedplus
" additional settings
syntax enable syntax enable
set number " enable line numbers set clipboard^=unnamed,unnamedplus " system clipboard (requires +clipboard)
set backup " create backup files in runtimepath/backup/ set number " enable line numbers
set undofile " persistent undo files in runtimepath/undo/ set backup " create backup files in runtimepath/backup/
set modeline " enable vim modelines set undofile " persistent undo files in runtimepath/undo/
set hlsearch " highlight search items set modeline " enable vim modelines
set incsearch " searches are performed as you type set hlsearch " highlight search items
set confirm " ask confirmation like save before quit. set incsearch " searches are performed as you type
set tabstop=4 " tab is equivalent to how many spaces set confirm " ask confirmation like save before quit.
set softtabstop=4 " tab is equivalent to how many spaces set tabstop=4 " tab is equivalent to how many spaces
set shiftwidth=4 " amount of spaces for indentation set softtabstop=4 " tab is equivalent to how many spaces
set shortmess+=aAcws " hide or shorten certain messages set shiftwidth=4 " amount of spaces for indentation
set wildmenu " tab completion menu when using command mode set shortmess+=aAcws " hide or shorten certain messages
set wildignore+=*~,*.pyc,*/.git/*,*.so,*.swp,*.o,*.zip,*.zwc,*.png,*.jpg set wildmenu " tab completion menu in command mode
set ttimeout
set ttimeoutlen=10
set timeoutlen=600
set updatecount=80
set linebreak breakindent set linebreak breakindent
set list listchars=tab:>>,trail:~ set list listchars=tab:>>,trail:~
set wildignore+=*~,*.pyc,*/.git/*,*.so,*.swp,*.o,*.zip,*.zwc,*.png,*.jpg
set mouse=niv " use the terminal mouse in command mode (:) set mouse=niv " use the terminal mouse in command mode (:)
if has('mouse_sgr')
" sgr mouse is better but not every term supports it if has('mouse_sgr') " sgr mouse is better but not every term supports it
set ttymouse=sgr set ttymouse=sgr
endif endif
@ -44,13 +41,7 @@ let g:netrw_browse_split = 3
if $TERM !=? 'linux' if $TERM !=? 'linux'
set termguicolors set termguicolors
" true colors in terminals (neovim doesn't need this)
if !has('nvim') && !($TERM =~? 'xterm' || &term =~? 'xterm')
let $TERM = 'xterm-256color'
let &term = 'xterm-256color'
endif
if has('multi_byte') && $TERM !=? 'linux' if has('multi_byte') && $TERM !=? 'linux'
" ▏│ ┆ ┃ »»
set list listchars=tab:▏\ ,extends:,precedes: set list listchars=tab:▏\ ,extends:,precedes:
set fillchars=vert:┃ showbreak= set fillchars=vert:┃ showbreak=
endif endif
@ -83,35 +74,10 @@ endif
" ------ commands ------ " ------ commands ------
command! D Explore command! D Explore
command! R call <SID>ranger()
command! -bang -complete=buffer -nargs=? Bclose call Bclose(<bang>, <args>)
command! -complete=buffer -nargs=? Bselect call Bselect(<args>)
command! W exec 'silent w !sudo tee % >/dev/null'|edit! command! W exec 'silent w !sudo tee % >/dev/null'|edit!
" ------ basic maps ------ " ------ basic maps ------
" visually select the whole file
vnoremap aa VGo1G
" yank the entire file
nnoremap gyy gg"+yG''
vnoremap gyy <Esc>gg"+yG''
" open ranger as a file chooser using the function below
nnoremap <leader>r :call <SID>ranger()<CR>
" select buffer from a list
nnoremap <Leader>b :Bselect<CR>
" close current buffer (and tab if needed)
nnoremap <Leader>q :Bclose<CR>:silent tabclose<CR>gT
" change windows with ctrl+(hjkl)
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" alt defaults " alt defaults
nnoremap 0 ^ nnoremap 0 ^
nnoremap Y y$ nnoremap Y y$
@ -120,38 +86,16 @@ nnoremap N Nzzzv
nnoremap <Tab> ==1j nnoremap <Tab> ==1j
vnoremap <Tab> == vnoremap <Tab> ==
" re-visual text after changing indent
vnoremap > >gv
vnoremap < <gv
" toggle line numbers, nn (no number)
nnoremap <silent> <Leader>nn :set number!
" gj/k but preserve numbered jumps ie: 12j or 45k " gj/k but preserve numbered jumps ie: 12j or 45k
nmap <buffer><silent><expr>j v:count ? 'j' : 'gj' nmap <buffer><silent><expr>j v:count ? 'j' : 'gj'
nmap <buffer><silent><expr>k v:count ? 'k' : 'gk' nmap <buffer><silent><expr>k v:count ? 'k' : 'gk'
" open a terminal in $PWD
nnoremap <silent> <Leader>tt :terminal<CR>
" toggle folding " toggle folding
nnoremap <leader>za :set foldenable!<CR> nnoremap <leader>za :set foldenable!<CR>
" tab control
nnoremap <silent> <M-j> :tabmove -1<CR>
nnoremap <silent> <M-k> :tabmove +1<CR>
nnoremap <silent> <Leader>te :tabnew<CR>
nnoremap <silent> <Leader>tn :tabnext<CR>
nnoremap <silent> <Leader>tf :tabfirst<CR>
nnoremap <silent> <Leader>tp :tabprevious<CR>
" open a new tab in the current directory with netrw (file browser)
nnoremap <silent> <Leader>- :tabedit <C-R>=expand("%:p:h")<CR><CR>
" fix syntax highlighting issues " fix syntax highlighting issues
nnoremap U :syntax sync fromstart<CR>:redraw!<CR> nnoremap U :syntax sync fromstart<CR>:redraw!<CR>
" ------ autocmd ------ " ------ autocmd ------
" when quitting a file save the cursor position and reload if file changed " when quitting a file save the cursor position and reload if file changed
@ -187,184 +131,3 @@ else
" otherwise disable cursorline " otherwise disable cursorline
set nocursorline set nocursorline
endif endif
" ------ adv maps ------
" strip trailing whitespace, ss (strip space)
nnoremap <silent> <Leader>ss
\ :let b:_p = getpos(".") <Bar>
\ let b:_s = (@/ != '') ? @/ : '' <Bar>
\ %s/\s\+$//e <Bar>
\ let @/ = b:_s <Bar>
\ nohlsearch <Bar>
\ unlet b:_s <Bar>
\ call setpos('.', b:_p) <Bar>
\ unlet b:_p <CR>
" global replace
vnoremap <Leader>sw "hy
\ :let b:sub = input('global replacement: ') <Bar>
\ if b:sub !=? '' <Bar>
\ let b:rep = substitute(getreg('h'), '/', '\\/', 'g') <Bar>
\ execute '%s/'.b:rep."/".b:sub.'/g' <Bar>
\ unlet b:sub b:rep <Bar>
\ endif <CR>
nnoremap <Leader>sw
\ :let b:sub = input('global replacement: ') <Bar>
\ if b:sub !=? '' <Bar>
\ execute "%s/<C-r><C-w>/".b:sub.'/g' <Bar>
\ unlet b:sub <Bar>
\ endif <CR>
" prompt before each replace
vnoremap <Leader>cw "hy
\ :let b:sub = input('interactive replacement: ') <Bar>
\ if b:sub !=? '' <Bar>
\ let b:rep = substitute(getreg('h'), '/', '\\/', 'g') <Bar>
\ execute '%s/'.b:rep.'/'.b:sub.'/gc' <Bar>
\ unlet b:sub b:rep <Bar>
\ endif <CR>
nnoremap <Leader>cw
\ :let b:sub = input('interactive replacement: ') <Bar>
\ if b:sub !=? '' <Bar>
\ execute "%s/<C-r><C-w>/".b:sub.'/gc' <Bar>
\ unlet b:sub <Bar>
\ endif <CR>
" highlight long lines, ll (long lines)
let w:longlines = matchadd('ColorColumn', '\%'.&textwidth.'v', &textwidth)
nnoremap <silent> <Leader>ll
\ :if exists('w:longlines') <Bar>
\ silent! call matchdelete(w:longlines) <Bar>
\ echo 'Long line highlighting disabled'
\ <Bar> unlet w:longlines <Bar>
\ elseif &textwidth > 0 <Bar>
\ let w:longlines = matchadd('ColorColumn', '\%'.&textwidth.'v', &textwidth) <Bar>
\ echo 'Long line highlighting enabled'
\ <Bar> else <Bar>
\ let w:longlines = matchadd('ColorColumn', '\%80v', 81) <Bar>
\ echo 'Long line highlighting enabled'
\ <Bar> endif <CR>
" local keyword jump
nnoremap <Leader>fw
\ [I:let b:jump = input('Go To: ') <Bar>
\ if b:jump !=? '' <Bar>
\ execute "normal! ".b:jump."[\t" <Bar>
\ unlet b:jump <Bar>
\ endif <CR>
function! Bclose(bang, buffer) abort
if empty(a:buffer)
let l:target = bufnr('%')
elseif a:buffer =~? '^\d\+$'
let l:target = bufnr(str2nr(a:buffer))
else
let l:target = bufnr(a:buffer)
endif
if l:target < 0
call WarningMsg('No matching buffer for '.a:buffer)
return
endif
if empty(a:bang) && getbufvar(l:target, '&modified')
call WarningMsg('No write since last change for buffer '.l:target.' (use :Bclose!)')
return
endif
" Numbers of windows that view target buffer which we will delete.
let l:num_wins = filter(range(1, winnr('$')), 'winbufnr(v:val) == l:target')
if empty(a:bang) && len(l:num_wins) > 1
call WarningMsg('Buffer is open in multiple windows (use :Bclose!)')
return
endif
let l:cur_win = winnr()
for w in l:num_wins
execute w.'wincmd w'
let prevbuf = bufnr('#')
if prevbuf > 0 && buflisted(prevbuf) && prevbuf != w
buffer #
else
bprevious
endif
if l:target == bufnr('%')
" Numbers of listed buffers which are not the target to be deleted.
let blisted = filter(range(1, bufnr('$')), 'buflisted(v:val) && v:val != l:target')
" Listed, not target, and not displayed.
let bhidden = filter(copy(blisted), 'bufwinnr(v:val) < 0')
" Take the first buffer, if any (could be more intelligent).
let bjump = (bhidden + blisted + [-1])[0]
if bjump > 0
execute 'buffer '.bjump
else
execute 'enew'.a:bang
endif
endif
endfor
execute 'bdelete'.a:bang.' '.l:target
execute l:cur_win.'wincmd w'
endfunction
function! Bselect(...) abort
let l:pattern = a:0 >= 1 ? a:1 : ''
if l:pattern ==? ''
let l:pattern = input('String match: ')
redraw!
endif
if l:pattern !=# ''
let l:bufcount = bufnr('$')
let l:currbufnr = 1
let l:nummatches = 0
let l:matchingbufnr = 0
while l:currbufnr <= l:bufcount
if bufexists(l:currbufnr)
let l:currbufname = bufname(l:currbufnr)
if (match(l:currbufname, l:pattern) > -1)
echo l:currbufnr . ': ' . l:currbufname
let l:nummatches += 1
let l:matchingbufnr = l:currbufnr
endif
endif
let l:currbufnr += 1
endwhile
if (l:nummatches == 1)
execute ':buffer '.l:matchingbufnr
elseif (l:nummatches > 1)
let l:desiredbufnr = input('Enter buffer number: ')
if (strlen(l:desiredbufnr) != 0)
execute ':buffer ' . l:desiredbufnr
endif
else
call WarningMsg('No matching buffers')
endif
endif
endfunction
function! <SID>ranger()
let l:temp = tempname()
execute 'silent !xterm -e ranger --choosefiles='.shellescape(l:temp).' $PWD'
if !filereadable(temp)
redraw!
return
endif
let l:names = readfile(l:temp)
if empty(l:names)
redraw!
return
endif
execute 'edit '.fnameescape(l:names[0])
for l:name in l:names[1:]
execute 'argadd '.fnameescape(l:name)
endfor
redraw!
endfunction

View File

@ -1,53 +0,0 @@
[general]
distance = 30
useNetWMFullscreen = true
ignoreSkipTaskbar = true
updateFreq = 10.0
lazyTrans = false
pipePath = /tmp/skippy-xd-fifo
movePointerOnStart = true
movePointerOnSelect = true
movePointerOnRaise = true
switchDesktopOnActivate = true
useNameWindowPixmap = false
forceNameWindowPixmap = false
includeFrame = true
allowUpscale = true
showAllDesktops = true
showUnmapped = true
preferredIconSize = 32
clientDisplayModes = thumbnail icon filled none
iconFillSpec = orig mid mid #383838
fillSpec = orig mid mid #EFF0F1
background =
[xinerama]
showAll = true
[normal]
tint = #000000
tintOpacity = 60
opacity = 250
[highlight]
tint = #000000
tintOpacity = 0
opacity = 250
[tooltip]
show = true
followsMouse = true
offsetX = 20
offsetY = 20
align = left
border = #EFF0F1
background = #212121
opacity = 240
text = #EFF0F1
textShadow = none
font = Ubuntu 10
[bindings]
miwMouse1 = focus
miwMouse2 = close-ewmh
miwMouse3 = iconify

View File

@ -17,6 +17,6 @@
<property name="general-notification" type="bool" value="false"/> <property name="general-notification" type="bool" value="false"/>
<property name="inactivity-on-ac" type="uint" value="14"/> <property name="inactivity-on-ac" type="uint" value="14"/>
<property name="lock-screen-suspend-hibernate" type="bool" value="false"/> <property name="lock-screen-suspend-hibernate" type="bool" value="false"/>
<property name="dpms-enabled" type="bool" value="false"/> <property name="dpms-enabled" type="bool" value="true"/>
</property> </property>
</channel> </channel>