aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
m---------vim/bundle/vundle0
-rw-r--r--vim/bundles.vim12
-rw-r--r--vimrc16
4 files changed, 27 insertions, 4 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..8e7bc95
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "vim/bundle/vundle"]
+ path = vim/bundle/vundle
+ url = https://github.com/gmarik/vundle.git
diff --git a/vim/bundle/vundle b/vim/bundle/vundle
new file mode 160000
+Subproject f31aa52552ceb40240e56e475e6df89cc756507
diff --git a/vim/bundles.vim b/vim/bundles.vim
new file mode 100644
index 0000000..d2e06c0
--- /dev/null
+++ b/vim/bundles.vim
@@ -0,0 +1,12 @@
+
+" Vundle setup
+set rtp+=~/.vim/bundle/vundle/
+call vundle#rc()
+Bundle 'gmarik/vundle'
+
+" Enable plugins.
+filetype plugin indent on
+
+" My list of plugins.
+Bundle 'tpope/vim-surround.git'
+
diff --git a/vimrc b/vimrc
index 5603bbc..d68633a 100644
--- a/vimrc
+++ b/vimrc
@@ -93,13 +93,21 @@ set expandtab
set backspace=indent,eol,start
""
-" Filetypes
+" Plugins.
filetype off
filetype indent plugin off
+
+" Using the Go plugins from the official repo.
set runtimepath+=$GOROOT/misc/vim
-filetype on
-filetype indent plugin on
+
+" All the plugins are listed in my bundles file, that will be installed
+" inside the ~/.vim directory.
+source ~/.vim/bundles.vim
+
+""
+" Filetypes
+
autocmd FileType ruby set shiftwidth=2
autocmd FileType c set shiftwidth=4 tabstop=4
autocmd FileType yacc set shiftwidth=4 tabstop=4
@@ -110,7 +118,7 @@ autocmd FileType go set shiftwidth=4 tabstop=4
let mapleader = ","
-" <C-S> in insert/normal mode: switch to normal mode and write to disk.
+" <C-S> in normal/insert mode: switch to normal mode and write to disk.
inoremap <C-S> <ESC>:w<CR>
nnoremap <C-S> :w<CR>