Commit graph

63 commits

Author SHA1 Message Date
Jesse Atkinson
50b95cbbcd Update plugin to escape path to bin/man.fish (#37)
Previously an error would throw if the path to `/bin/man.fish` involved spaces or other special characters. This commit escapes the string before having Vim parse it. 

Resolves https://github.com/dag/vim-fish/issues/36#issuecomment-254576309
2017-11-22 22:58:10 +01:00
Dag Odenhall
f3d20cee00
Merge pull request #23 from robodendron/shiftwidth-function
Use `shiftwidth()` instead of `&shiftwidth`
2017-11-22 13:01:04 +01:00
Dag Odenhall
90399fd5ce
Merge pull request #27 from euclio/comments
fix highlighting of inline comments
2017-11-22 12:06:07 +01:00
Dag Odenhall
b1f7ca42aa
Merge pull request #32 from andersonba/master
Escape the current path in keywordprg
2017-11-22 10:37:21 +01:00
Anderson de Oliveira
670b541a2f Escape current path 2015-09-20 15:40:29 -03:00
Andy Russell
f6c26ad242 fix highlighting of inline comments 2014-10-19 17:16:55 -07:00
Patrice Peterson
986fcb1e1f Use shiftwidth() instead of &shiftwidth
The `shiftwidth` option can be set to 0, in which case the tabstop value
is used instead. In order to always set the correct shiftwidth, the Vim
docs advise the use of the `shiftwidth()` function.
2014-04-21 10:59:51 +02:00
Dag Odenhall
825853f481 Merge pull request #21 from AzizLight/in-as-a-repeat-keyword
Highlight the `in` part of a `for` loop
2013-12-09 05:49:56 -08:00
Aziz Light
4777645272 Highlight the in part of a for loop 2013-12-06 16:48:12 +00:00
Dag Odenhall
0cca394cb0 new-style syntastic checker, fixes #19 2013-11-29 01:43:41 +01:00
Dag Odenhall
9afcc08d14 update readme for new funced behavior 2013-11-14 13:45:56 +01:00
Dag Odenhall
e35e2f356a don't startinsert with funced, closes #12 2013-11-14 13:34:20 +01:00
Dag Odenhall
9da005e04e fix spacing in for snippet
I had added the extra spacing as a work-around for a bug in UltiSnips
which turns out to be a result of a Vim option I had set to a
non-default value.  It's still a bug in UltiSnips, but most people will
not be affected and my work-around will do more harm than good.
2013-08-14 13:51:50 +02:00
Dag Odenhall
b9b2014a5c only use 'j' format option if available
Fixes #13 and #15, part of #14
2013-07-20 19:43:49 +02:00
Dag Odenhall
9033f54efc ignore column marker line in :make output 2013-06-06 23:55:04 +02:00
Dag Odenhall
4b4f7af985 don't suggest setting options globally
Closes #10
2013-06-06 23:36:53 +02:00
Dag Odenhall
26419916d7 don't set foldmethod
The defaults in Vim mean that folds will start out closed, if we set
foldmethod to something other than manual.  This is rather annoying for
people who don't like or use folding, and who leave the relevant options
at their defaults.  Thus, folding should be opt-in, not opt-out.  The
simplest way to achieve this is probably to leave it up to the user to
set foldmethod approprietly.  We do however set foldexpr since this
doesn't do anything until foldmethod is set to expr and advanced users
can easily override it should they want to.

Fixes #8 but needs more work in #10
2013-06-06 20:30:49 +02:00
Dag Odenhall
16d12bd7e4 prepend to suffixesadd instead of append
This way `.fish` is probably prioritized.
2013-06-04 23:59:03 +02:00
Dag Odenhall
d3d73d5327 don't fish_indent in insert mode
Presumably this only happens with automatic formatting and since the
cursor is moved all kinds of crazy things happen and break.
2013-06-04 14:18:55 +02:00
Dag Odenhall
525e2b47b7 syntax checking using vim's compiler architecture 2013-06-04 10:59:49 +02:00
Dag Odenhall
ad16f711f9 also look for /usr/bin/env in shebang 2013-06-03 16:31:46 +02:00
Dag Odenhall
0577fd5d17 only mimic funced for files in functions dir 2013-06-03 13:49:13 +02:00
Dag Odenhall
15497e8a8e misc cleanup 2013-06-03 13:46:59 +02:00
Dag Odenhall
f4432fed80 detect fish scripts by shebang line
We can't use `:setfiletype` for this because we need to sidestep any
filetype set previously by extension, such as `*.sh`.
2013-06-03 12:28:13 +02:00
Dag Odenhall
8926f8bf71 use local &formatexpr instead of global &formatprg
Fixes #9
2013-05-30 20:03:57 +02:00
Dag Odenhall
d5ca72e230 only append to &suffixesadd
This way if someone is using it with ":find" it will continue to work
for more than just fish scripts.
2013-05-30 18:34:51 +02:00
Dag Odenhall
b6503f4c24 bail if syntax already loaded 2013-05-29 23:53:49 +02:00
Dag Odenhall
b15e68333f allow overriding highlight groups without autocmds 2013-05-29 18:21:06 +02:00
Dag Odenhall
e3e4057051 better syntax for line continuations
Part of #4
2013-05-25 21:55:42 +02:00
Dag Odenhall
2ffdc9c4ec set &define so things like ]d work for functions
For example `C-w d` jumps to the definition of the function under the cursor in
a split window, if it is defined in the same file or a file it sources.
2013-05-24 22:36:47 +02:00
Dag Odenhall
5635a899af don't assume /tmp for funced
But do assume there's two numbers in the name.
2013-05-19 22:17:00 +02:00
Dag Odenhall
7e2a7878b3 mimic funced when manually creating new function 2013-05-18 19:58:51 +02:00
Dag Odenhall
1f01a378e1 don't look for funced in new buffers
Fish passes an existing file so this is more correct.
2013-05-18 19:51:15 +02:00
Dag Odenhall
40432982df use empty() instead of ==# 2013-05-18 19:48:40 +02:00
Dag Odenhall
530f956af8 default to filename as name of function in snippet
This is useful for writing lazy-loading functions without using funced.
2013-05-18 19:46:33 +02:00
Dag Odenhall
33eb7a5b6b fix faulty elif snippet placeholder 2013-05-17 12:02:03 +02:00
Dag Odenhall
4ee96b7b56 readme improvements 2013-05-15 22:01:47 +02:00
Dag Odenhall
9fe2ccf415 folding with foldexpr
Closes #2
2013-05-15 21:05:55 +02:00
Dag Odenhall
27a2faa412 fall back on syntaxcomplete for omni completions
If fish is not in $PATH, instead of getting a nasty error message as the
completion we get some minimal completions for the keywords defined in
the syntax file.
2013-05-15 19:50:48 +02:00
Dag Odenhall
62a6addd76 sort settings in ftplugin 2013-05-15 19:47:28 +02:00
Dag Odenhall
df1dc34d96 comment formatting 2013-05-15 19:46:37 +02:00
Dag Odenhall
449ff0eb99 support for gf and [i and friends 2013-05-15 19:07:37 +02:00
Dag Odenhall
b3a89a5cd7 refactor indentation 2013-05-15 12:58:26 +02:00
Dag Odenhall
d93c89fa56 optimize and refactor completions 2013-05-14 22:29:57 +02:00
Dag Odenhall
a688142cf6 fix buggy variable and wildcard completions
Fixes #5
2013-05-14 20:20:38 +02:00
Dag Odenhall
be7ee41c57 revised readme 2013-05-14 20:05:35 +02:00
Dag Odenhall
11fcbbeeca move indentexpr function to autoload 2013-05-14 19:10:05 +02:00
Dag Odenhall
ccebc890ba omni completions
Hooks into fish's completion system allowing you to complete input in
Vim as if you were in fish, with ^X^O.

Closes #3
2013-05-14 18:59:40 +02:00
Dag Odenhall
3f8178262d support for the matchit addon
This makes it possible to use % to cycle between the start of a control
structure and its 'end', among other things the matchit addon is capable
of.
2013-05-14 15:29:40 +02:00
Dag Odenhall
97e6b0b060 use fish's man function for &keywordprg
This makes it possible to use K to view the man page for the fish
builtin under the cursor.
2013-05-14 13:29:26 +02:00