bon-voyage.vim is a simple vim plugin that sets up your workspace on starting vim.
- Auto sourcing
.bon-voyage.vim
in the current directory on starting up vim- And if it's not found, try to source
.bon-voyage.vim
in your $HOME directory
- And if it's not found, try to source
- Loading source files from multiple
cargo
files. - Never run when vim is running with any arguments or reading stdin
Add this to your .vimrc file.
Plug 'itmammoth/bon-voyage.vim'
Then, :PlugInstall
Add this to your .vimrc file.
call dein#add('itmammoth/bon-voyage.vim')
Then, :call dein#install()
Plugin 'itmammoth/bon-voyage.vim'
... and many other plugin managers.
Create .bon-voyage.vim
in a rails root directory.
" the_rails_root/.bon-voyage.vim
if has('gui_running')
set columns=190 lines=70
endif
edit spec/factories.rb
vsplit db/schema.rb
let NERDTreeIgnore = ['tmp[[dir]]', 'bundle[[dir]]']
NERDTree
wincmd =
Rcd
Run vim in the directory without any arguments.
$ cd the_rails_root
$ gvim
Create .bon-voyage.vim
in your $HOME
directory. (If .bon-voyage.vim
is not found in the current directory, $HOME directory will be the search directory to find bon-voyage.vim
)
" ~/.bon-voyage.vim
edit $MYVIMRC
Run vim without any arguments.
$ cd any_directory
$ vim
You can split source into multiple files as cargos for reusing in any directories.
Create cargo files in ~/.bon-voyage/cargos
" ~/.bon-voyage/cargos/ide.vim
if has('gui_running')
set columns=190 lines=70
endif
NERDTree
" ~/.bon-voyage/cargos/javascript.vim
set ts=4 sw=4 sts=4
Create .bon-voyage.vim
in a directory, then load the cargos with BonVoyageLoad
command.
" the_javascript_project/.bon-voyage.vim
BonVoyageLoad 'ide'
BonVoyageLoad 'javascript'
Run vim in the directory without any arguments.
$ cd the_javascript_project
$ gvim
Set the filename to be sourced on starting vim.
default: ".bon-voyage.vim"
e.x.)
let g:bonvoyage_filename = '.bv.vim'
Set cargos directory.
default: "~/.bon-voyage/cargos"
e.x.)
let g:bonvoyage_cargo_dir = '~/.dotfiles/vim/bon-voyage/cargos'
Fork it, blankslate.vimrc
is the essential vim script file for testing.
$ vim -u blankslate.vimrc -U NONE
MIT License.