@@ -24,35 +24,33 @@ Features aplenty
24
24
* Automatic formatting of comments.
25
25
26
26
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 ` :
28
29
29
30
``` vim
30
31
syntax enable
31
32
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:
32
38
39
+ ``` vim
33
40
" Set up :make to use fish for syntax checking.
34
- compiler! fish
41
+ compiler fish
35
42
36
43
" 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
47
45
48
46
" 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
54
48
```
55
49
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
+
56
54
A team player
57
55
-------------
58
56
0 commit comments