summaryrefslogtreecommitdiffstats
path: root/ship/src/bootstrap_env_makefu
diff options
context:
space:
mode:
Diffstat (limited to 'ship/src/bootstrap_env_makefu')
-rwxr-xr-xship/src/bootstrap_env_makefu99
1 files changed, 49 insertions, 50 deletions
diff --git a/ship/src/bootstrap_env_makefu b/ship/src/bootstrap_env_makefu
index 7ec59a79..e61f4e99 100755
--- a/ship/src/bootstrap_env_makefu
+++ b/ship/src/bootstrap_env_makefu
@@ -4,10 +4,24 @@
#@strict
#@include core
#@include punani
+#@include vim
+
+# vim +python
+_punanidb_pacman_vim_python=gvim
+_punanidb_yum_vim_python=vim-enhanced
+_punanidb_aptget_vim_python=vim
+
+# TODO pull out youcompleteme into a vim function
+# cmake ,make,g++,python-dev for youcompleteme
+_punanidb_pacman_cmake=cmake
+_punanidb_yum_cmake=cmake
+_punanidb_aptget_cmake=cmake
+#@mainifyme
+
info "Configuring environment for $(id -un)"
cd $(readlink -f $(dirname $0))
info "Using punani to install git vim and zsh"
-punani install git vim zsh || error "cannot install some shit"
+punani install git vim_python zsh gpp cmake make python2_dev || die "cannot install some shit"
info "writing dotfiles"
# deploying zshrc
@@ -54,8 +68,13 @@ test -r ~/TODO && cat ~/TODO
setopt menu_complete
unsetopt correct_all
+export PYTHONSTARTUP=~/.pythonrc
+EOF
+info 'deploying pythonrc'
+cat > $HOME/.pythonrc <<EOF
+import rlcompleter, readline
+readline.parse_and_bind('tab:complete')
EOF
-
info "deploying vim config"
if [ -e $HOME/.vim ] ; then
oldvim=$HOME/.vim.`date +%Y%M%d`
@@ -68,43 +87,36 @@ mkdir -p $HOME/.vim
# TODO modilarize vimconfig
cat > $HOME/.vim/vimrc <<EOF
-set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle
call vundle#rc()
-
" TODO refactor this
Bundle 'gmarik/vundle'
Bundle 'SudoEdit.vim'
Bundle 'snipMate'
Bundle 'tpope/vim-fugitive'
-Bundle 'vim-scripts-iptables'
-Bundle 'pyflakes'
+Bundle 'Valloric/YouCompleteMe'
+Bundle 'scrooloose/syntastic'
+Bundle 'sjl/gundo.vim'
+
+nnoremap <F5> :GundoToggle<CR>
+set undodir=~/.vim/undo
+set undofile
+"maximum number of changes that can be undone
+set undolevels=1000000
+"maximum number lines to save for undo on a buffer reload
+set undoreload=10000000
+
+set pastetoggle=<F2>
+set showmode
+filetype plugin indent on
+
filetype plugin indent on
-syntax on
-set vb
let g:snips_author = 'Bob Ross <root@syntax-fehler.de>'
let g:makefu_author = 'makefu'
-set foldenable
-set foldmethod=syntax
-" shows matching braches etc
-set showmatch
-set matchtime=3
-" highlight search
-set hlsearch
-
-" set noswapfile
-" set nobackup
-set backupdir=~/.vim/backup
-set directory=~/.vim/backup
-
-" turn off F1
-inoremap <F1> <ESC>
-nnoremap <F1> <ESC>
-vnoremap <F1> <ESC>
" pasting
nnoremap <F2> :set invpaste paste?<CR>
set pastetoggle=<F2>
@@ -114,44 +126,31 @@ set showmode
au FocusLost * :wa
set spelllang=en
-" use set spell to enable spelling
-
-" press ttt to rot16 the whole file
-nmap ttt ggg?G
-colorscheme darkblue
-set background=dark
-
-set number
-set mouse=
set textwidth=9001
-set ignorecase
-set incsearch
-set wildignore=*.o,*.obj,*.bak,*.exe,*.os
-
-set shiftwidth=2
-set tabstop=2
-set et
-set sw=2
-set smarttab
-set autoindent
-" end tabstop
-set backspace=indent,eol,start
-set nocp
autocmd BufRead *.json set filetype=json
EOF
-
+if [ -e $HOME/.vimrc ] ; then
+ oldvim=$HOME/.vimrc.`date +%Y%M%d`
+ info "Backing up old vimrc file to $oldvim"
+ mv -v $HOME/.vimrc $oldvim
+fi
+info "Symlinking .vimrc to .vim/vimrc"
ln -vs $HOME/.vim/vimrc $HOME/.vimrc
+vim_conf_sane_defaults
#install all the vim stuff with the help of vundle
cd $HOME/.vim
-mkdir bundle
-mkdir backup
+mkdir -p bundle undo backup
info "Fetching vim-vundle"
git clone https://github.com/gmarik/vundle.git bundle/vundle > /dev/null && \
info "Vim Vundle deployed"
info "Installing Vundle Bundles"
vim "+:BundleInstall" "+:qall"
+
+info "building youcompleteme libs"
+cd $HOME/.vim/bundle/YouCompleteMe
+./install.sh
cd -
info "configuring zsh"