Skip to content

Commit a8c04ef

Browse files
sbennett18spf13
authored andcommitted
Populate .vimrc.before with all spf13 options
* .vimrc.before should not be modified (just like any other non-local or non-fork config file) * .vimrc.before contains a list of all options that can be set * .vimrc.before.local is where these options would actually be set * support .vimrc.before and .vimrc.before.fork in install scripts
1 parent 85909e3 commit a8c04ef

File tree

6 files changed

+73
-14
lines changed

6 files changed

+73
-14
lines changed

.vimrc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@
829829

830830
" To specify a different directory in which to place the vimbackup,
831831
" vimviews, vimundo, and vimswap files/directories, add the following to
832-
" your .vimrc.local file:
832+
" your .vimrc.before.local file:
833833
" let g:spf13_consolidated_directory = <full path to desired directory>
834834
" eg: let g:spf13_consolidated_directory = $HOME . '/.vim/'
835835
if exists('g:spf13_consolidated_directory')
@@ -854,6 +854,7 @@
854854
endif
855855
endfor
856856
endfunction
857+
call InitializeDirectories()
857858
" }
858859

859860
" Initialize NERDTree as needed {
@@ -873,7 +874,7 @@
873874
" Strip whitespace {
874875
function! StripTrailingWhitespace()
875876
" To disable the stripping of whitespace, add the following to your
876-
" .vimrc.local file:
877+
" .vimrc.before.local file:
877878
" let g:spf13_keep_trailing_whitespace = 1
878879
if !exists('g:spf13_keep_trailing_whitespace')
879880
" Preparation: save last search, and cursor position.
@@ -933,7 +934,3 @@
933934
endif
934935
endif
935936
" }
936-
937-
" Finish local initializations {
938-
call InitializeDirectories()
939-
" }

.vimrc.before

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
" Modeline and Notes {
2+
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker spell:
3+
"
4+
" __ _ _____ _
5+
" ___ _ __ / _/ |___ / __ __(_)_ __ ___
6+
" / __| '_ \| |_| | |_ \ _____\ \ / /| | '_ ` _ \
7+
" \__ \ |_) | _| |___) |_____|\ V / | | | | | | |
8+
" |___/ .__/|_| |_|____/ \_/ |_|_| |_| |_|
9+
" |_|
10+
"
11+
" This is the personal .vimrc.before file of Steve Francia.
12+
" While much of it is beneficial for general use, I would
13+
" recommend picking out the parts you want and understand.
14+
"
15+
" You can find me at http://spf13.com
16+
" }
17+
18+
" spf13 options {
19+
20+
" Prevent automatically changing to open file directory
21+
" let g:spf13_no_autochdir = 1
22+
23+
" Disable views
24+
" let g:spf13_no_views = 1
25+
26+
" Leader key
27+
" let g:spf13_leader='\'
28+
29+
" Disable easier moving in tabs and windows
30+
" let g:spf13_no_easyWindows = 1
31+
32+
" Disable fast tab navigation
33+
" let g:spf13_no_fastTabs
34+
35+
" Clear search highlighting
36+
" let g:spf13_clear_search_highlight = 1
37+
38+
" Disable neosnippet expansion
39+
" let g:spf13_no_neosnippet_expand = 1
40+
41+
" Disable whitespace stripping
42+
" let g:spf13_keep_trailing_whitespace = 1
43+
44+
" Enable powerline symbols
45+
" let g:airline_powerline_fonts = 1
46+
47+
" vim files directory
48+
" let g:spf13_consolidated_directory = <full path to desired directory>
49+
" eg: let g:spf13_consolidated_directory = $HOME . '/.vim/'
50+
51+
" }

README.markdown

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spf13-vim is a distribution of vim plugins and resources for Vim, Gvim and [MacV
1111

1212
It is a good starting point for anyone intending to use VIM for development running equally well on Windows, Linux, \*nix and Mac.
1313

14-
The distribution is completely customisable using a `~/.vimrc.local`, `~/.vimrc.bundles.local`, and `~/.vimrc.before` Vim RC files.
14+
The distribution is completely customisable using a `~/.vimrc.local`, `~/.vimrc.bundles.local`, and `~/.vimrc.before.local` Vim RC files.
1515

1616
![spf13-vim image][spf13-vim-img]
1717

@@ -41,7 +41,7 @@ The easiest way to install spf13-vim is to use our [automatic installer](https:/
4141
*Requires Git 1.7+ and Vim 7.3+*
4242

4343
```bash
44-
44+
4545
curl https://j.mp/spf13-vim3 -L > spf13-vim.sh && sh spf13-vim.sh
4646
```
4747

@@ -154,12 +154,14 @@ For example, to override the default color schemes:
154154
### Before File
155155

156156
Create a `~/.vimrc.before.local` file to define any customizations
157-
that get loaded *before* the spf-13 `.vimrc`.
157+
that get loaded *before* the spf13-vim `.vimrc`.
158158

159159
For example, to prevent autocd into a file directory:
160160
```bash
161161
echo let g:spf13_no_autochdir = 1 >> ~/.vimrc.before.local
162162
```
163+
For a list of available spf13-vim specific customization options, look at the `~/.vimrc.before` file.
164+
163165

164166
### Fork Customization
165167

@@ -176,7 +178,7 @@ and `.vimrc.bundles.fork` files in the root of their fork. The load order for t
176178
7. `.vimrc.fork` - fork vim configuration
177179
8. `.vimrc.local` - local user configuration
178180

179-
See `.vimrc.bundles` for specifics on what options can be set to override bundle configuration. See `.vimrc` for specifics
181+
See `.vimrc.bundles` for specifics on what options can be set to override bundle configuration. See `.vimrc.before` for specifics
180182
on what options can be overridden. Most vim configuration options should be set in your `.vimrc.fork` file, bundle configuration
181183
needs to be set in your `.vimrc.bundles.fork` file.
182184

@@ -396,11 +398,11 @@ For example this screen shot demonstrates pressing `,,w`
396398

397399
## [Airline]
398400

399-
Airline provides a lightweight themable statusline with no external dependencies. By default it uses the symbols `<` and `>` as separators for different statusline sections but can be configured to use the same symbols as [Powerline]. An example with and without powerline symbols is shown here:
401+
Airline provides a lightweight themable statusline with no external dependencies. By default it uses the symbols `` and `` as separators for different statusline sections but can be configured to use the same symbols as [Powerline]. An example with and without powerline symbols is shown here:
400402

401403
![airline image][airline-img]
402404

403-
To enable powerline symbols first install one of the [Powerline Fonts] or patch your favorite font using the provided instructions. Configure your terminal, MacVim, or Gvim to use the desired font. Finally add `let g:airline_powerline_fonts=1` to your `.vimrc.local`.
405+
To enable powerline symbols first install one of the [Powerline Fonts] or patch your favorite font using the provided instructions. Configure your terminal, MacVim, or Gvim to use the desired font. Finally add `let g:airline_powerline_fonts=1` to your `.vimrc.before.local`.
404406

405407
## Additional Syntaxes
406408

bootstrap.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ create_symlinks() {
107107

108108
lnif "$endpath/.vimrc" "$HOME/.vimrc"
109109
lnif "$endpath/.vimrc.bundles" "$HOME/.vimrc.bundles"
110+
lnif "$endpath/.vimrc.before" "$HOME/.vimrc.before"
110111
lnif "$endpath/.vim" "$HOME/.vim"
111112

112113
# Useful for fork maintainers
@@ -115,14 +116,19 @@ create_symlinks() {
115116
if [ -e "$endpath/.vimrc.fork" ]; then
116117
ln -sf "$endpath/.vimrc.fork" "$HOME/.vimrc.fork"
117118
elif [ "$fork_maintainer" -eq '1' ]; then
118-
touch "$HOME/.vimrc.fork"
119-
touch "$HOME/.vimrc.bundles.fork"
119+
touch "$HOME/.vimrc.fork"
120+
touch "$HOME/.vimrc.bundles.fork"
121+
touch "$HOME/.vimrc.before.fork"
120122
fi
121123

122124
if [ -e "$endpath/.vimrc.bundles.fork" ]; then
123125
ln -sf "$endpath/.vimrc.bundles.fork" "$HOME/.vimrc.bundles.fork"
124126
fi
125127

128+
if [ -e "$endpath/.vimrc.before.fork" ]; then
129+
ln -sf "$endpath/.vimrc.before.fork" "$HOME/.vimrc.before.fork"
130+
fi
131+
126132
if [ ! -d "$endpath/.vim/bundle" ]; then
127133
mkdir -p "$endpath/.vim/bundle"
128134
fi

spf13-vim-windows-install.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ call mklink "%HOME%\_vimrc" "%BASE_DIR%\.vimrc"
1818
call mklink "%HOME%\.vimrc.fork" "%BASE_DIR%\.vimrc.fork"
1919
call mklink "%HOME%\.vimrc.bundles" "%BASE_DIR%\.vimrc.bundles"
2020
call mklink "%HOME%\.vimrc.bundles.fork" "%BASE_DIR%\.vimrc.bundles.fork"
21+
call mklink "%HOME%\.vimrc.before" "%BASE_DIR%\.vimrc.before"
22+
call mklink "%HOME%\.vimrc.before.fork" "%BASE_DIR%\.vimrc.before.fork"
2123
call mklink /J "%HOME%\.vim" "%BASE_DIR%\.vim"
2224

2325
IF NOT EXIST "%BASE_DIR%\.vim\bundle" (

spf13-vim-windows-xp-install.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ call xcopy /s/e/h/y/r/q/i "%BASE_DIR%\.vim" "%HOME%\.vim"
2727
call copy "%BASE_DIR%\.vimrc" "%HOME%\.vimrc"
2828
call copy "%BASE_DIR%\.vimrc" "%HOME%\_vimrc"
2929
call copy "%BASE_DIR%\.vimrc.bundles" "%HOME%\.vimrc.bundles"
30+
call copy "%BASE_DIR%\.vimrc.before" "%HOME%\.vimrc.before"
3031

3132
@if not exist "%HOME%/.vim/bundle/vundle" call git clone https://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle"
3233
call vim -u "%BASE_DIR%/.vimrc.bundles" - +BundleInstall! +BundleClean +qall

0 commit comments

Comments
 (0)