Skip to content

Commit 4b4f7af

Browse files
committed
don't suggest setting options globally
Closes #10
1 parent 2641991 commit 4b4f7af

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

README.md

+15-17
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,33 @@ Features aplenty
2424
* Automatic formatting of comments.
2525

2626
For everything above to work you need to have fish installed in `$PATH` and
27-
some Vim features turned on:
27+
some Vim features turned on. First, tell Vim to use the syntax and filetype
28+
functionality, normally in your `~/.vimrc`:
2829

2930
```vim
3031
syntax enable
3132
filetype plugin indent on
33+
```
34+
35+
Next, set some options for the `fish` filetype. You can do this either by
36+
prefixing each line with `autocmd FileType fish`, or by putting them in your
37+
own `~/.vim/ftplugin/fish.vim` file:
3238

39+
```vim
3340
" Set up :make to use fish for syntax checking.
34-
compiler! fish
41+
compiler fish
3542
3643
" Set this to have long lines wrap inside comments.
37-
set textwidth=79
38-
39-
" Like above, but also format whole paragraphs inside comments live.
40-
" This is great for prose, but obnoxious if you're trying to type something
41-
" like code inside a comment.
42-
set formatoptions+=a
43-
44-
" Use this if you want folds to start out closed, or set it to 1 if you want to
45-
" see the gist of top-level blocks (such as function definitions).
46-
set foldlevelstart=0
44+
setlocal textwidth=79
4745
4846
" Enable folding of block structures in fish.
49-
set foldmethod=expr
50-
51-
" If you don't like every little thing folded, experiment with this setting to
52-
" only fold larger blocks.
53-
set foldminlines=5
47+
setlocal foldmethod=expr
5448
```
5549

50+
To make the folds more pleasant to work with you might also want to tweak
51+
settings like `foldlevelstart` and `foldminlines`, which you could do either
52+
globally in your `~/.vimrc` or locally as described above.
53+
5654
A team player
5755
-------------
5856

0 commit comments

Comments
 (0)