add git config, changed some vim config stuff, other de changes

This commit is contained in:
Daniel Flanagan 2017-02-28 10:56:23 -06:00
parent 8ffbcf2e3d
commit 76927e5096
6 changed files with 111 additions and 34 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export BAR_MONITOR="$(polybar --list-monitors | tail -n 1 | sed -n 's/^\s*\(.*\):.*$/\1/p')" export BAR_MONITOR="$(polybar --list-monitors | tail -n 1 | sed -n 's/^\s*\(.*\):.*$/\1/p')"
export BAR_HEIGHT=25 export BAR_HEIGHT=40
export BAR_ON_TOP=0 export BAR_ON_TOP=0
export BAR_SIDE_MARGIN=200 export BAR_SIDE_MARGIN=200

View file

@ -16,5 +16,7 @@ if [ -f "$HOME/.env_xinitrc" ]; then
source "$HOME/.env_xinitrc" source "$HOME/.env_xinitrc"
fi fi
pulseaudio --start &
# fire up wm # fire up wm
exec "$DOTFILES_PATH/de/wmstart" exec "$DOTFILES_PATH/de/wmstart"

12
misc/git/config Normal file
View file

@ -0,0 +1,12 @@
[push]
default = matching
[user]
name = Daniel Flanagan
email = daniel@lytedev.io
[core]
editor = nvim
[http "https://gopkg.in"]
followRedirects = true

3
setup
View file

@ -59,6 +59,9 @@ links=(
# neofetch config # neofetch config
"$dfp/misc/neofetch/config" "$HOME/.config/neofetch/config" "$dfp/misc/neofetch/config" "$HOME/.config/neofetch/config"
# git config
"$dfp/misc/git/config" "$HOME/.gitconfig"
) )
source="" source=""

View file

@ -5,6 +5,7 @@ bind-key s send-prefix
# statusbar on bottom # statusbar on bottom
set-option -g status-position bottom set-option -g status-position bottom
set-option -g mouse on
# honestly not sure # honestly not sure
set -g escape-time 10 set -g escape-time 10
@ -58,7 +59,10 @@ set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum' set -g @plugin 'tmux-plugins/tmux-continuum'
# highlight with Prefix+[, yank to clipboard with y
set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat' set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-sessionist' set -g @plugin 'tmux-plugins/tmux-sessionist'

View file

@ -1,3 +1,5 @@
set nocompatible
" initial plugin manager installation " initial plugin manager installation
if has('nvim') if has('nvim')
if empty(glob('~/.config/nvim/autoload/plug.vim')) if empty(glob('~/.config/nvim/autoload/plug.vim'))
@ -11,8 +13,37 @@ else
endif endif
end end
let $vimdir = $HOME.'/.vim'
if has('nvim')
let $vimdir = $HOME.'/.config/nvim'
endif
" OS detection functions
silent function! OSX()
return has('macunix')
endfunction
silent function! LINUX()
return has('unix') && !has('macunix') && !has('win32unix')
endfunction
silent function! WINDOWS()
return (has('win32') || has('win64'))
endfunction
" tell vim to reload the init.vim file when it saves it " tell vim to reload the init.vim file when it saves it
autocmd! BufWritePost init.vim source % " if has('nvim')
" autocmd! BufWritePost init.vim source %
" else
" autocmd! BufWritePost .vimrc source %
" end
" load a per-environment file if one exists
if filereadable(expand("$HOME/.env_init.vim"))
source "$HOME/.env_init.vim"
endif
if has('vim_starting')
set encoding=utf8
endif
" plugin build functions " plugin build functions
function! BuildComposer(info) function! BuildComposer(info)
@ -26,18 +57,16 @@ function! DoRemote(arg)
UpdateRemotePlugins UpdateRemotePlugins
endfunction endfunction
" Initialize plugin manager " initialize plugin manager
if has('nvim') if has('nvim')
call plug#begin('~/.config/nvim/bundle') call plug#begin('~/.config/nvim/bundle')
else else
call plug#begin('~/.vim/bundle') call plug#begin('~/.vim/bundle')
endif endif
" let plugin manager manage itself " let plugin manager manage itself
Plug 'junegunn/vim-plug' Plug 'junegunn/vim-plug'
" plugins " plugins
" if vim is being launched to view man pages, don't do our magical session " if vim is being launched to view man pages, don't do our magical session
@ -49,6 +78,7 @@ else
Plug 'dhruvasagar/vim-prosession' " more session ease-of-use Plug 'dhruvasagar/vim-prosession' " more session ease-of-use
let g:prosession_dir = '~/.config/nvim/session/' let g:prosession_dir = '~/.config/nvim/session/'
endif endif
Plug 'vim-airline/vim-airline' " statusline Plug 'vim-airline/vim-airline' " statusline
" let g:airline_powerline_fonts = 0 " let g:airline_powerline_fonts = 0
let g:airline#extensions#tabline#enabled = 1 " automatically displays all buffers when there's only one tab open let g:airline#extensions#tabline#enabled = 1 " automatically displays all buffers when there's only one tab open
@ -61,6 +91,7 @@ let g:airline_right_alt_sep = ''
let g:airline_right_sep = '' let g:airline_right_sep = ''
let g:airline_left_alt_sep= '' let g:airline_left_alt_sep= ''
let g:airline_left_sep = '' let g:airline_left_sep = ''
let g:airline#extensions#tabline#buffers_label = ''
Plug 'vim-airline/vim-airline-themes' Plug 'vim-airline/vim-airline-themes'
Plug 'scrooloose/nerdtree', {'on': ['NERDTreeToggle', 'NERDTree']} " nice sidebar for files Plug 'scrooloose/nerdtree', {'on': ['NERDTreeToggle', 'NERDTree']} " nice sidebar for files
@ -76,7 +107,6 @@ Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } " autocomplete
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 1
Plug 'scrooloose/syntastic' " syntax checker Plug 'scrooloose/syntastic' " syntax checker
Plug 'freitass/todo.txt-vim' " syntax checker
Plug 'bkad/CamelCaseMotion' " camel case and underscore word movements Plug 'bkad/CamelCaseMotion' " camel case and underscore word movements
Plug 'LargeFile' " gracefully handle very large files Plug 'LargeFile' " gracefully handle very large files
Plug 'tpope/vim-commentary' " toggle comments in code easily Plug 'tpope/vim-commentary' " toggle comments in code easily
@ -90,8 +120,8 @@ Plug 'tpope/vim-surround' " quickly modify text surrounding objects
Plug 'tpope/vim-speeddating' " vim knows about date-like text objects Plug 'tpope/vim-speeddating' " vim knows about date-like text objects
Plug 'michaeljsmith/vim-indent-object' " adds an indentation level text object Plug 'michaeljsmith/vim-indent-object' " adds an indentation level text object
Plug 'wellle/targets.vim' " adds some more handy text objects Plug 'wellle/targets.vim' " adds some more handy text objects
Plug 'ternjs/tern_for_vim', { 'do': 'npm install' } Plug 'ternjs/tern_for_vim', { 'do': 'npm install' } " javascript helpful things
Plug 'mikewest/vimroom' Plug 'mikewest/vimroom' " distraction-free editing
Plug 'editorconfig/editorconfig-vim' " loads project-specific editor settings Plug 'editorconfig/editorconfig-vim' " loads project-specific editor settings
let g:vimroom_sidebar_height = 0 let g:vimroom_sidebar_height = 0
@ -100,6 +130,7 @@ Plug 'junegunn/fzf.vim' " helpers for using fzf in vim
let g:fzf_layout = { 'window': 'enew' } let g:fzf_layout = { 'window': 'enew' }
" plugins for specific file types " plugins for specific file types
Plug 'kchmck/vim-coffee-script', {'for': ['coffee', 'coffeescript', 'vue']} Plug 'kchmck/vim-coffee-script', {'for': ['coffee', 'coffeescript', 'vue']}
Plug 'posva/vim-vue', {'for': ['vue']} Plug 'posva/vim-vue', {'for': ['vue']}
Plug 'elixir-lang/vim-elixir', {'for': ['elixir']} Plug 'elixir-lang/vim-elixir', {'for': ['elixir']}
@ -109,7 +140,6 @@ Plug 'rust-lang/rust.vim', {'for': ['rs', 'rust']}
" Plug 'plasticboy/vim-markdown', {'for': ['md', 'markdown']} " Plug 'plasticboy/vim-markdown', {'for': ['md', 'markdown']}
" Plug 'euclio/vim-markdown-composer', { 'do': function('BuildComposer'), 'for': ['md', 'markdown'] } " Plug 'euclio/vim-markdown-composer', { 'do': function('BuildComposer'), 'for': ['md', 'markdown'] }
Plug 'digitaltoad/vim-jade', {'for': ['pug', 'jade', 'vue']} Plug 'digitaltoad/vim-jade', {'for': ['pug', 'jade', 'vue']}
Plug 'freitass/todo.txt-vim', {'for': ['todo']}
Plug 'leafo/moonscript-vim', {'for': ['moon', 'moonscript']} Plug 'leafo/moonscript-vim', {'for': ['moon', 'moonscript']}
Plug 'evidens/vim-twig' Plug 'evidens/vim-twig'
Plug 'leafgarland/typescript-vim', {'for': ['ts', 'typescript']} Plug 'leafgarland/typescript-vim', {'for': ['ts', 'typescript']}
@ -141,18 +171,24 @@ autocmd BufNewFile,BufReadPost *.md setl filetype=markdown spell
autocmd BufNewFile,BufReadPost *.txt setl spell textwidth=0 wrapmargin=0 autocmd BufNewFile,BufReadPost *.txt setl spell textwidth=0 wrapmargin=0
" whitespace " whitespace
" use tabs at a two-space width
set tabstop=2 set tabstop=2
set shiftwidth=2 set shiftwidth=2
set softtabstop=2 set softtabstop=2
set noexpandtab set noexpandtab
" auto/smart indent
set autoindent smartindent set autoindent smartindent
" show certain whitespace characters
set list set list
set nostartofline set nostartofline
set listchars=trail,tab:\ \ ,trail:~ set listchars=trail,tab:\ \ ,trail:~
" set listchars=eol:\ ,tab:>-,trail:~,extends:>,precedes:<,space:· " set listchars=eol:\ ,tab:>-,trail:~,extends:>,precedes:<,space:·
" look and feel " look and feel
"
" try and keep text (and code) to a width of 80 characters
set wrap set wrap
set linebreak set linebreak
set breakindent set breakindent
@ -166,17 +202,27 @@ set formatoptions=crql1j
" 1 don't break a line after a one-letter word - break it before " 1 don't break a line after a one-letter word - break it before
" j where it makes sense, remove a comment leader when joining lines " j where it makes sense, remove a comment leader when joining lines
set title " handle window title " handle window title
set title
" don't do syntax highlighting on lines longer than 2048 characters
set synmaxcol=2048 set synmaxcol=2048
if exists('asmanviewer') if exists('asmanviewer')
set nonumber " no line numbers when viewing a man page set nonumber " no line numbers when viewing a man page
else else
set number " line numbers set number " line numbers
endif endif
" set relativenumber
set cursorline " highlight the current line " relative line numbers
set relativenumber
" highlight the current line
set cursorline
" set cursorcolumn " highlight the current column " set cursorcolumn " highlight the current column
" let &colorcolumn=join(range(81,400),",") " colors columns past 80 " let &colorcolumn=join(range(81,400),",") " colors columns past 80
set showcmd set showcmd
set nowildmenu set nowildmenu
set wildmode=longest,list,full set wildmode=longest,list,full
@ -209,12 +255,17 @@ let base16colorspace=256
set background=dark set background=dark
colorscheme base16-donokai colorscheme base16-donokai
" TODO: need a way to toggle this and maybe make it on by default except in
" files where space indentation is expected
fun! ShowSpaceIndentation() fun! ShowSpaceIndentation()
hi WhiteSpaces ctermfg=black ctermbg=8 hi LeadingWhiteSpaces ctermfg=black ctermbg=8
match WhiteSpaces /^ \+/
endfunction endfunction
fun! HideSpaceIndentation()
hi LeadingWhiteSpaces ctermfg=black ctermbg=black
endfunction
hi LeadingWhiteSpaces ctermfg=black ctermbg=black
" a toggle-able minimalistic "distraction-free" text editing mode " a toggle-able minimalistic distraction-free text editing mode
let s:distractionFreeMode = 0 let s:distractionFreeMode = 0
fun! DistractionFreeModeFunc() fun! DistractionFreeModeFunc()
AirlineToggle AirlineToggle
@ -248,7 +299,7 @@ fun! CheckCloseDistractionFreeMode()
endif endif
endfunction endfunction
" run the check function every time we leave a window " run the previous checking function every time we leave a window
if has('autocmd') if has('autocmd')
autocmd WinLeave * call CheckCloseDistractionFreeMode() autocmd WinLeave * call CheckCloseDistractionFreeMode()
endif endif
@ -257,25 +308,27 @@ nnoremap <silent> <Leader>mz :DistractionFreeMode<CR>
:command! SpaceIndents call ShowSpaceIndentation() :command! SpaceIndents call ShowSpaceIndentation()
:command! ShowSpaceIndents call ShowSpaceIndentation() :command! ShowSpaceIndents call ShowSpaceIndentation()
:command! HideSpaceIndents call HideSpaceIndentation()
:command! DistractionFreeMode call DistractionFreeModeFunc() :command! DistractionFreeMode call DistractionFreeModeFunc()
let $vimdir = $HOME.'/.vim'
if has('nvim')
let $vimdir = $HOME.'/.config/nvim'
endif
set hidden " allows buffer switching without saving set hidden " allows buffer switching without saving
set shortmess=I set shortmess=I
set history=1000 set history=1000
" undo files
set undofile set undofile
set undodir=$vimdir/undo set undodir=$vimdir/undo
set undolevels=1000 set undolevels=1000
set undoreload=10000 set undoreload=10000
" backup files
set backupdir=$vimdir/backup set backupdir=$vimdir/backup
set directory=$vimdir/backup set directory=$vimdir/backup
" spell file
set spellfile=$vimdir/spell/en.utf-8.add set spellfile=$vimdir/spell/en.utf-8.add
" smart case insensitivity by default
set ignorecase set ignorecase
set smartcase set smartcase
set incsearch set incsearch
@ -286,11 +339,8 @@ set foldmethod=syntax
set foldlevel=99 set foldlevel=99
set foldnestmax=10 set foldnestmax=10
set nofoldenable set nofoldenable
set foldlevelstart=1 set foldlevelstart=0
if has('vim_starting')
set encoding=utf8
endif
set autowrite set autowrite
set autochdir set autochdir
set autoread set autoread
@ -313,6 +363,7 @@ endif
" no empty buffer on startup " no empty buffer on startup
autocmd VimEnter * nested if bufname('')=='' && line('$') == 1 && col('$')==1 && !&modified | bd % | endif autocmd VimEnter * nested if bufname('')=='' && line('$') == 1 && col('$')==1 && !&modified | bd % | endif
" terminal split in neovim
if has('nvim') if has('nvim')
function! TerminalSplit() function! TerminalSplit()
let current_file = @% let current_file = @%
@ -390,6 +441,9 @@ nnoremap <C-o> :Files<CR>
" launch fzf for files modified or not in git " launch fzf for files modified or not in git
nnoremap <C-u> :GFiles?<CR> nnoremap <C-u> :GFiles?<CR>
" launch fzf for open buffers (files)
nnoremap <C-b> :Buffers<CR>
" launch fzf for open buffers (files) " launch fzf for open buffers (files)
nnoremap <leader>l :Buffers<CR> nnoremap <leader>l :Buffers<CR>
@ -413,7 +467,7 @@ inoremap <A-BS> <C-w>
" clear search higlight " clear search higlight
nnoremap <leader>/ :let @/ = ""<CR> nnoremap <leader>/ :let @/ = ""<CR>
" remap jk and kj to escape in insert mode " remap jk/jj and its variants to escape
inoremap jj <Esc> inoremap jj <Esc>
inoremap Jj <Esc> inoremap Jj <Esc>
inoremap Jj <Esc> inoremap Jj <Esc>
@ -442,17 +496,17 @@ omap <silent> ie <Plug>CamelCaseMotion_ie
xmap <silent> ie <Plug>CamelCaseMotion_ie xmap <silent> ie <Plug>CamelCaseMotion_ie
" a _ objects " a _ objects
omap <silent> aw <Plug>CamelCaseMotion_aw " omap <silent> aw <Plug>CamelCaseMotion_aw
xmap <silent> aw <Plug>CamelCaseMotion_aw " xmap <silent> aw <Plug>CamelCaseMotion_aw
omap <silent> ab <Plug>CamelCaseMotion_ab omap <silent> ab <Plug>CamelCaseMotion_ab
xmap <silent> ab <Plug>CamelCaseMotion_ab xmap <silent> ab <Plug>CamelCaseMotion_ab
omap <silent> ae <Plug>CamelCaseMotion_ae omap <silent> ae <Plug>CamelCaseMotion_ae
xmap <silent> ae <Plug>CamelCaseMotion_ae xmap <silent> ae <Plug>CamelCaseMotion_ae
" remove trailing whitespace: " remove trailing whitespace
map <F3> mw:%s/\s\+$//<CR>:let @/ = ""<CR>'w map <F3> mw:%s/\s\+$//<CR>:let @/ = ""<CR>'w
" close buffer: " close buffer with leader-w
nnoremap <silent> <leader>w :bd<CR> nnoremap <silent> <leader>w :bd<CR>
" toggle spell checking: " toggle spell checking:
@ -461,7 +515,7 @@ map <F5> :setlocal spell!<CR>
" open urls, files, etc. example: http://google.com: " open urls, files, etc. example: http://google.com:
noremap <leader>o :!xdg-open <cfile><CR><CR> noremap <leader>o :!xdg-open <cfile><CR><CR>
" keep that dumb window from popping up " keep that dumb window from popping up (wild something or another)
map q: :q map q: :q
noremap qqq: q: noremap qqq: q:
@ -479,3 +533,5 @@ xnoremap > >gv
" modify higlight colors " modify higlight colors
hi Search cterm=NONE ctermbg=blue ctermfg=black hi Search cterm=NONE ctermbg=blue ctermfg=black
highlight LineNr ctermbg=none ctermfg=8
highlight CursorLineNr ctermbg=18 ctermfg=gray