diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..34d6cb6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vim/bundle/vim-airline"] + path = vim/bundle/vim-airline + url = https://github.com/vim-airline/vim-airline diff --git a/bash_aliases.sh b/bash_aliases.sh index a4e7eb6..8ea4eff 100644 --- a/bash_aliases.sh +++ b/bash_aliases.sh @@ -68,6 +68,7 @@ function sync_git_only() git commit -am "Autocommitted updated scripts from $(hostname)" fi git pull --rebase + git submodule update --init --recursive if ! git --no-pager diff --exit-code origin/master master; then git --no-pager log --reverse origin/master..master if ! read -p "OK to push these changes? (Y/N) " -N 1 confirm; then diff --git a/new-host.sh b/new-host.sh index 13dd988..b040677 100644 --- a/new-host.sh +++ b/new-host.sh @@ -3,7 +3,7 @@ set -eux if [[ ! -d ~/.common-configs ]]; then - git clone https://github.com/programmablereya/common-configs.git ~/.common-configs + git clone --recurse-submodules https://github.com/programmablereya/common-configs.git ~/.common-configs cd ~/.common-configs else cd ~/.common-configs diff --git a/per-host/Adversary/.vim b/per-host/Adversary/.vim new file mode 120000 index 0000000..3a26453 --- /dev/null +++ b/per-host/Adversary/.vim @@ -0,0 +1 @@ +../../vim \ No newline at end of file diff --git a/per-host/MoonMother/.vim b/per-host/MoonMother/.vim new file mode 120000 index 0000000..3a26453 --- /dev/null +++ b/per-host/MoonMother/.vim @@ -0,0 +1 @@ +../../vim \ No newline at end of file diff --git a/per-host/blocky-cafe/.vim b/per-host/blocky-cafe/.vim new file mode 120000 index 0000000..3a26453 --- /dev/null +++ b/per-host/blocky-cafe/.vim @@ -0,0 +1 @@ +../../vim \ No newline at end of file diff --git a/per-host/rock64/.vim b/per-host/rock64/.vim new file mode 120000 index 0000000..3a26453 --- /dev/null +++ b/per-host/rock64/.vim @@ -0,0 +1 @@ +../../vim \ No newline at end of file diff --git a/per-host/template/.vim b/per-host/template/.vim new file mode 120000 index 0000000..3a26453 --- /dev/null +++ b/per-host/template/.vim @@ -0,0 +1 @@ +../../vim \ No newline at end of file diff --git a/vim/autoload/pathogen.vim b/vim/autoload/pathogen.vim new file mode 100644 index 0000000..3582fbf --- /dev/null +++ b/vim/autoload/pathogen.vim @@ -0,0 +1,264 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.4 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your +" .vimrc is the only other setup necessary. +" +" The API is documented inline below. + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Point of entry for basic default usage. Give a relative path to invoke +" pathogen#interpose() or an absolute path to invoke pathogen#surround(). +" Curly braces are expanded with pathogen#expand(): "bundle/{}" finds all +" subdirectories inside "bundle" inside all directories in the runtime path. +" If no arguments are given, defaults "bundle/{}", and also "pack/{}/start/{}" +" on versions of Vim without native package support. +function! pathogen#infect(...) abort + if a:0 + let paths = filter(reverse(copy(a:000)), 'type(v:val) == type("")') + else + let paths = ['bundle/{}', 'pack/{}/start/{}'] + endif + if has('packages') + call filter(paths, 'v:val !~# "^pack/[^/]*/start/[^/]*$"') + endif + let static = '^\%([$~\\/]\|\w:[\\/]\)[^{}*]*$' + for path in filter(copy(paths), 'v:val =~# static') + call pathogen#surround(path) + endfor + for path in filter(copy(paths), 'v:val !~# static') + if path =~# '^\%([$~\\/]\|\w:[\\/]\)' + call pathogen#surround(path) + else + call pathogen#interpose(path) + endif + endfor + call pathogen#cycle_filetype() + if pathogen#is_disabled($MYVIMRC) + return 'finish' + endif + return '' +endfunction + +" Split a path into a list. +function! pathogen#split(path) abort + if type(a:path) == type([]) | return a:path | endif + if empty(a:path) | return [] | endif + let split = split(a:path,'\\\@]','\\&','') + endif +endfunction + +" Like findfile(), but hardcoded to use the runtimepath. +function! pathogen#runtime_findfile(file,count) abort + let rtp = pathogen#join(1,pathogen#split(&rtp)) + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif +endfunction + +" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': diff --git a/vim/bundle/vim-airline b/vim/bundle/vim-airline new file mode 160000 index 0000000..b93492b --- /dev/null +++ b/vim/bundle/vim-airline @@ -0,0 +1 @@ +Subproject commit b93492b40b068d4bb3020c123295061aaba7c846 diff --git a/vimrc b/vimrc index 40bf7f9..efe8646 100644 --- a/vimrc +++ b/vimrc @@ -1,7 +1,11 @@ " link destination: $HOME/.vimrc + " Enable modern Vim features not compatible with Vi spec. set nocompatible +" Run Pathogen package manager +execute pathogen#infect() + " Enable file type based indent configuration and syntax highlighting. " Note that when code is pasted via the terminal, vim by default does not detect " that the code is pasted (as opposed to when using vim's paste mappings), which @@ -13,14 +17,7 @@ set nocompatible filetype plugin indent on syntax on -" So we can see tabs and trailing spaces. -hi SpecialKey ctermbg=Yellow guibg=Yellow -" Make it so that tabs and trailing spaces are always visible: -" (Relys on syntax highlighting to turn them yellow.) -set list -set listchars=tab:\ \ ,trail:\ ,extends:»,precedes:« -let g:Powerline_symbols = 'unicode' -let g:Powerline_stl_path_style = 'short' +let g:airline#extensions#tabline#enabled = 1 set modeline set expandtab set shiftwidth=2