Skip to content

Commit 8ea22fd

Browse files
committed
Merge branch '3.0' of github.com:spf13/spf13-vim into 3.0
2 parents de66798 + 8fc0ba3 commit 8ea22fd

File tree

3 files changed

+36
-33
lines changed

3 files changed

+36
-33
lines changed

.vimrc

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@
127127

128128
" Setting up the directories {
129129
set backup " backups are nice ...
130+
if has('persistent_undo')
131+
set undofile "so is persistent undo ...
132+
set undolevels=1000 "maximum number of changes that can be undone
133+
set undoreload=10000 "maximum number lines to save for undo on a buffer reload
134+
endif
130135
" Could use * rather than *.*, but I prefer to leave .files unsaved
131136
au BufWinLeave *.* silent! mkview "make vim save view (state) (folds, cursor, etc)
132137
au BufWinEnter *.* silent! loadview "make vim load view (state) (folds, cursor, etc)
@@ -507,29 +512,33 @@
507512
" Functions {
508513

509514
function! InitializeDirectories()
510-
let separator = "."
511-
let parent = $HOME
512-
let prefix = '.vim'
513-
let dir_list = {
514-
\ 'backup': 'backupdir',
515-
\ 'views': 'viewdir',
516-
\ 'swap': 'directory' }
517-
518-
for [dirname, settingname] in items(dir_list)
519-
let directory = parent . '/' . prefix . dirname . "/"
520-
if exists("*mkdir")
521-
if !isdirectory(directory)
522-
call mkdir(directory)
523-
endif
524-
endif
525-
if !isdirectory(directory)
526-
echo "Warning: Unable to create backup directory: " . directory
527-
echo "Try: mkdir -p " . directory
528-
else
529-
let directory = substitute(directory, " ", "\\\\ ", "g")
530-
exec "set " . settingname . "=" . directory
531-
endif
532-
endfor
515+
let separator = "."
516+
let parent = $HOME
517+
let prefix = '.vim'
518+
let dir_list = {
519+
\ 'backup': 'backupdir',
520+
\ 'views': 'viewdir',
521+
\ 'swap': 'directory' }
522+
523+
if has('persistent_undo')
524+
let dir_list['undo'] = 'undodir'
525+
endif
526+
527+
for [dirname, settingname] in items(dir_list)
528+
let directory = parent . '/' . prefix . dirname . "/"
529+
if exists("*mkdir")
530+
if !isdirectory(directory)
531+
call mkdir(directory)
532+
endif
533+
endif
534+
if !isdirectory(directory)
535+
echo "Warning: Unable to create backup directory: " . directory
536+
echo "Try: mkdir -p " . directory
537+
else
538+
let directory = substitute(directory, " ", "\\\\ ", "g")
539+
exec "set " . settingname . "=" . directory
540+
endif
541+
endfor
533542
endfunction
534543
call InitializeDirectories()
535544

README.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The easiest way to install spf13-vim is to use our [automatic installer](http://
4040

4141
```bash
4242

43-
curl http://j.mp/spf13-vim3 -o - | sh
43+
curl http://j.mp/spf13-vim3 -L -o - | sh
4444

4545
```
4646

@@ -357,8 +357,8 @@ Here's some tips if you've never used VIM before:
357357
## Useful commands
358358

359359
* Use `:q` to exit vim
360-
* Certain commands are prefixed with a `<Leader>` key, which by default maps to `\`
361-
by default. Spf13-vim uses `let mapleader = ","` to change this to `,` which is in a consistent and
360+
* Certain commands are prefixed with a `<Leader>` key, which by default maps to `\`.
361+
Spf13-vim uses `let mapleader = ","` to change this to `,` which is in a consistent and
362362
convenient location.
363363
* Keyboard [cheat sheet](http://walking-without-crutches.heroku.com/image/images/vi-vim-cheat-sheet.png).
364364

bootstrap.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,4 @@ echo "Installing Vundle"
2929
git clone http://github.com/gmarik/vundle.git $HOME/.vim/bundle/vundle
3030

3131
echo "installing plugins using Vundle"
32-
vim +BundleInstall! +BundleClean +q
33-
34-
# Build command-t for your system
35-
echo "building command-t executable\n"
36-
echo "command-t depends on ruby and rake to be present\n"
37-
cd $HOME/.vim/bundle/Command-T
38-
(rake make) || warn "Ruby compilation failed. Ruby, GCC or rake not installed?"
32+
vim +BundleInstall! +BundleClean +q

0 commit comments

Comments
 (0)