From 5e3433d3b441446ab33cdc085714f03647773de6 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sat, 2 Aug 2014 00:38:28 -0400 Subject: [PATCH] Added README.md, used full name for gitconfig and added Ultisnips, vimsnippets, and neocomplete to vimrc --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ gitconfig | 2 +- vimrc | 46 ++++++++++++++++++++++++++++++++++------------ 3 files changed, 73 insertions(+), 13 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..6b419ba --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +Sync +========= + +Sync syncs tmux/vim/bash config files with one command + +Usage: + +```sh +usage: sync.sh [-h] [-t] [-c] [-b] [-s] [-d] + +optional arguements: + -h Show this help message and exit + -t Syncs tmux configuration file + -c Syncs other configuration files + -b Syncs Vim bundles + -s Syncs computer with server applications in server.txt + -d Syncs computer with desktop applications in desktop.txt +``` + +Or, install vim bundles and vimrc, customizing which bundles you use first (requires `curl` and `vim` packages): + +```sh +mkdir -p ~/.vim/plugin/ ~/.vim/backup/ ~/.vim/undo/ ~/.vim/tmp/ ~/.vim/bundle/ ~/.vim/bundle/ ; if [ ! -f ~/.vim/plugin/sessionman.vim ] ; then curl -o ~/.vim/plugin/sessionman.vim http://www.vim.org/scripts/download_script.php?src_id=15599 ; fi ; if [ ! -d ~/.vim/bundle/vundle/ ] ; then git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle ; fi ; curl -o ~/.vimrc -k https://austenwares.com/gitlab/stonewareslord/Sync/raw/master/vimrc ; vim ~/.vimrc +"execute \"normal /Bundle 'gmarik\/vundle'\\"" +"execute \"normal :nohlsearch\:function Save()\w\BundleInstall\qa\endfunction\\"" +"nnoremap :call Save():so ~/.vimrc:BundleInstall" ; echo "Installation should be complete. Run \"vim\" to check" +``` + +Usage: run this command and it will automatically load the bundle list with descriptions of each. Delete the ones you don't want to install and press `F2` in normal mode to install al at once. + +Or, temporarily load the bashrc (requires `curl` package): + +```sh +curl -k -o /tmp/tmprc https://98.26.78.121/gitlab/stonewareslord/Sync/raw/master/tmprc && . /tmp/tmprc ; rm /tmp/tmprc +``` + +Or, clone the sync project and add all origins automatically: + +```sh +mkdir sync&&cd sync&&git init&&git remote add testorigin https://98.26.78.121/gitlab/stonewareslord/Sync.git&&git config http.sslVerify false&&git pull testorigin master&&. bashrc&&git remote rm testorigin&&initify stonewareslord Sync -r +``` diff --git a/gitconfig b/gitconfig index aa78b49..3cf5f5e 100644 --- a/gitconfig +++ b/gitconfig @@ -1,5 +1,5 @@ [user] - name = Austen + name = Austen Adler email = stonewareslord@gmail.com [alias] i = "!git br&&git st" diff --git a/vimrc b/vimrc index 2abb554..bc8e25d 100644 --- a/vimrc +++ b/vimrc @@ -117,8 +117,9 @@ nnoremap W nnoremap :bp nnoremap :bn nnoremap z _| -nnoremap bn G?Bundleyyp$hdi'"+gP0Wl3d/\/x:nohlsearch:up:BundleInstall +nnoremap bun G?Bundleyyjp$hdi'"+gP0Wl3d/\/xjyyP$"+gp:nohlsearch:up:BundleInstall nnoremap :CtrlPFunky +nnoremap :set invpaste nmap [e nmap ]e vmap [egv @@ -179,19 +180,32 @@ let g:Powerline_symbols='fancy' let g:indent_guides_start_level=1 let g:indent_guides_guide_size=1 let g:indent_guides_enable_on_vim_startup=1 -let g:neocomplcache_enable_at_startup=1 -let g:neocomplcache_enable_camel_case_completion=1 -let g:neocomplcache_enable_smart_case=1 -let g:neocomplcache_enable_underbar_completion=1 -let g:neocomplcache_enable_auto_delimiter=1 -let g:neocomplcache_max_list=20 -let g:neocomplcache_force_overwrite_completefunc=1 -let g:neocomplcache_min_syntax_length=2 +"let g:neocomplcache_enable_at_startup=1 +"let g:neocomplcache_enable_camel_case_completion=1 +"let g:neocomplcache_enable_smart_case=1 +"let g:neocomplcache_enable_underbar_completion=1 +"let g:neocomplcache_enable_auto_delimiter=1 +"let g:neocomplcache_max_list=20 +"let g:neocomplcache_force_overwrite_completefunc=1 +"let g:neocomplcache_min_syntax_length=2 +"let g:neocomplcache_enable_auto_select=1 +let g:neocomplete#enable_at_startup = 1 +let g:neocomplete#enable_smart_case = 1 +let g:neocomplete#sources#syntax#min_keyword_length = 2 +autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS +autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags +autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS +autocmd FileType python setlocal omnifunc=pythoncomplete#Complete +autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags let g:php_refactor_command='php /usr/local/bin/refactor.phar' let g:ctrlp_extensions=['funky'] "inoremap neocomplcache#smart_close_popup()."\" -"let g:neocomplcache_enable_auto_select=1 let loaded_matchit=1 +let g:UltiSnipsEditSplit="vertical" +let g:UltiSnipsExpandTrigger="" +let g:UltiSnipsJumpForwardTrigger="" +let g:UltiSnipsJumpBackwardTrigger="" +inoremap pumvisible() ? "\" : "\" filetype off call vundle#rc() "Bundle 'Floobits/floobits-vim' @@ -210,8 +224,8 @@ Bundle 'tpope/vim-surround' "Surround selection in ({\"' or HTML tags | https://github.com/tpope/vim-surround Bundle 'scrooloose/syntastic' "Syntax checker | https://github.com/scrooloose/syntastic -Bundle 'Shougo/neocomplcache.vim' - "Tab complete everything | https://github.com/Shougo/neocomplcache.vim +"Bundle 'Shougo/neocomplcache.vim' +" "Tab complete everything | https://github.com/Shougo/neocomplcache.vim Bundle 'nathanaelkane/vim-indent-guides' "Indentation guides | https://github.com/nathanaelkane/vim-indent-guides Bundle 'elzr/vim-json' @@ -266,6 +280,14 @@ Bundle 'tpope/vim-abolish' "Better abbrivation | https://github.com/tpope/vim-abolish Bundle 'godlygeek/csapprox' "256 color vim in terminal | https://github.com/godlygeek/csapprox +Bundle 'sirver/UltiSnips' + "Adds snippets | https://github.com/sirver/UltiSnips +Bundle 'honza/vim-snippets' + " | https://github.com/honza/vim-snippets +Bundle 'Shougo/neocomplete.vim' + " | https://github.com/Shougo/neocomplete.vim + " | + "DO NOT DELETE LINE ABOVE OR \bun WILL BREAK filetype plugin indent on if exists("+undofile") if isdirectory($HOME . '/.vim/undo')==0