mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2025-01-07 03:07:35 +00:00
Added automated install of Command T if requirements are present
This commit is contained in:
parent
714bd966bc
commit
c6f5c8556a
@ -1,8 +1,18 @@
|
||||
############################
|
||||
# Vim Settings Setup script by ViViDboarder (Ian)
|
||||
# http://github.com/ViViDboarder/Vim-Settings
|
||||
############################
|
||||
#! /bin/bash
|
||||
|
||||
# Get current directory for future use in links
|
||||
VIM_SYNC_DIR=${PWD}
|
||||
|
||||
# Verify git is installed (although needed to checkout
|
||||
command -v git >/dev/null 2>&1 || {
|
||||
echo "Error: git required for install";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# Clone vundle
|
||||
mkdir -p ~/.vim/bundle
|
||||
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
|
||||
@ -28,7 +38,7 @@ if [[ ( ! -f ~/.vimrc ) ]]; then
|
||||
fi
|
||||
|
||||
# if not already sourcing the synced version, source it
|
||||
if ! ( grep -q 'source .vimrc_sync' ~/.vimrc ); then
|
||||
if ! ( grep -q 'source ~/.vimrc_sync' ~/.vimrc ); then
|
||||
echo '' >> ~/.vimrc
|
||||
echo '"import vimrc from synced' >> ~/.vimrc
|
||||
echo 'source ~/.vimrc_sync' >> ~/.vimrc
|
||||
@ -43,8 +53,28 @@ fi
|
||||
# Install all bundles
|
||||
vim +BundleInstall! +qall
|
||||
|
||||
# Compile CommandT if possible
|
||||
# See if ruby is installed
|
||||
if command -v ruby >/dev/null 2>&1; then
|
||||
# Make sure GCC is installed
|
||||
if command -v gcc >/dev/null 2>&1; then
|
||||
# Use system ruby
|
||||
command -v rvm >/dev/null 2>&1 && { rvm use system; }
|
||||
cd ~/.vim/bundle/Command-T/ruby/command-t
|
||||
ruby extconf.rb
|
||||
make
|
||||
fi
|
||||
fi
|
||||
|
||||
vim --version | grep -q '\+ruby' || { echo "Warning: Default vim does not include ruby as needed for Command T"; }
|
||||
command -v ruby >/dev/null 2>&1 || { echo "Warning: ruby required for Command T"; }
|
||||
command -v gcc >/dev/null 2>&1 || { echo "Warning: gcc required for Command T"; }
|
||||
|
||||
# Execute vim's update of the helptags
|
||||
vim +"helptags ~/.vim/doc" +"q"
|
||||
|
||||
echo "Should install ctags with sudo apt-get install ctags"
|
||||
# Warn if ctags does not exist
|
||||
command -v ctags >/dev/null 2>&1 || { echo "Warning: ctags required for Tag List
|
||||
--- Debian: apt-get install ctags
|
||||
--- OSX (MacPorts): port install ctags"; }
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
let g:netrw_dirhistmax =10
|
||||
let g:netrw_dirhist_cnt =5
|
||||
let g:netrw_dirhist_1='/home/ianfijolek/Dropbox/linux_home/vim/vim/doc'
|
||||
let g:netrw_dirhist_2='/home/ianfijolek'
|
||||
let g:netrw_dirhist_3='/home'
|
||||
let g:netrw_dirhist_4='/'
|
||||
let g:netrw_dirhist_5='/home/ianfijolek'
|
@ -15,9 +15,9 @@ Bundle 'kien/ctrlp.vim'
|
||||
Bundle 'scrooloose/nerdtree'
|
||||
Bundle 'a.vim'
|
||||
Bundle 'file-line'
|
||||
Bundle 'tpope/vim-fugitive'
|
||||
" Needs Vim compiled with Ruby
|
||||
Bundle 'wincent/Command-T'
|
||||
Bundle 'tpope/vim-fugitive'
|
||||
|
||||
" Buffer Nav
|
||||
Bundle 'kien/tabman.vim'
|
||||
@ -38,6 +38,9 @@ Bundle 'gregsexton/MatchTag'
|
||||
"Allow arrow keys
|
||||
set nocompatible
|
||||
|
||||
"Use more convenient leader
|
||||
let mapleader=","
|
||||
|
||||
"Enable mouse input
|
||||
set mousehide
|
||||
set mouse=a
|
||||
@ -62,7 +65,6 @@ set backup
|
||||
set backupdir=~/.vim/backup
|
||||
set directory=~/.vim/tmp
|
||||
|
||||
|
||||
"set theme
|
||||
try
|
||||
colorscheme vividchalk
|
||||
@ -90,22 +92,15 @@ nmap <leader>lw :set wrap!<CR>
|
||||
"Allows filetype detection
|
||||
filetype on
|
||||
|
||||
"editing multiple files
|
||||
"Ctrl+j maximizes split below
|
||||
"Ctrl+k maximizes split above
|
||||
"allows size 0 splits
|
||||
"map <C-J> <C-W>j<C-W>_
|
||||
"map <C-K> <C-W>k<C-W>_
|
||||
"set wmh=0
|
||||
|
||||
"Move between splits using Ctrl+hjkl
|
||||
map <C-k> <C-w>k
|
||||
map <C-j> <C-w>j
|
||||
map <C-l> <C-w>l
|
||||
map <C-h> <C-w>h
|
||||
|
||||
" map Shift+U to redo
|
||||
map <S-u> <C-r>
|
||||
"map Shift+U to redo
|
||||
"Overwrites Make Uppercase
|
||||
map <S-u> <C-r>
|
||||
|
||||
" Buffet shortcut
|
||||
nnoremap <silent> <F2> :Bufferlist<CR>
|
||||
|
Loading…
Reference in New Issue
Block a user