dag / vim-fish Goto Github PK
View Code? Open in Web Editor NEWVim support for editing fish scripts
License: MIT License
Vim support for editing fish scripts
License: MIT License
:help textobj-function-customizing
Plugin works great with vim *.fish
, thanks so much for it!
Do you know how to get it to work with the funced
command?
For example, code like this is perfectly valid:
false
or begin
...
end
However currently if you type this the third line will not be automatically indented, and if you use endwise the end
will actually be dedented one level more than the or begin
!
To solve this we need a list of all these "combinator" builtins (only builtins have this power), and also remember that they can be chained, for example if not begin
. Also, the b
option should perhaps be removed from some or all of the UltiSnips snippets.
The following script
pushd foo
popd
will cause errors when validated with syntastic or the supplied fish compiler:
:!fish --no-execute /tmp/bug.fish 2>&1| tee /tmp/nvimVvLAs5/100
/tmp/bug.fish (line 1):
pushd foo
^
/tmp/bug.fish (line 2):
popd
^
This means creating a file doc/fish.txt
or possibly doc/ft-fish.txt
that includes helptags like ft-fish{,-syntax,-indent,-plugin,-omni}
etc. The README would then refer to these for post-installation setup.
Hi,
I've created a fork and merged some of the open prs.
Please see this issue: blankname/issues/1
This is my first time doing this and I'm not exactly sure what the proper etiquette is, so feel free to delete this issue if it's inappropriate to post an issue about a fork like this.
I will also delete this issue myself if someone informs me that it's inappropriate.
And to repeat what I say in the issue I linked above, thanks again for creating this project.
If a line ends with a backslash, the following line should highlight as being in argument position and possibly be indented two or three levels more than the previous line, unless that line too was a line continuation (but the editor in fish does not indent continued lines).
https://github.com/Shougo/neosnippet.vim
The plugin has snippets for Ultisnips but not neosnippets :(
If you type begin; end
ENTER echo
you end up with:
begin; end
echo
end
Which is also a fold.
Hooking into fish's completions would be really cool, but it would be a good start to complete functions, builtins and commands.
functions -a
builtin -n
for path in $PATH
for bin in $path/*
if test -x $bin
basename $bin
end
end
end
When I save a file with current syntastic and vim-fish enabled, I get the following error:
Unknown Function: syntastic#makeprg#build
Invalid Expression: syntastic#makeprg#build({'exe': 'fish','args': '--no-execute','subchecker': 'fish'})
Maybe their plugin API changed?
When editing a function with funced, the commented lines are replaced by empty lines.
This happens only if I use vim with this plugin and using the funced program.
Removing this plugin, or not sourcing any files by setting the -u flag for vim, I don't have this problem.
Simply calling vim test_function.fish will not trigger it either.
I don't see why it happens with funced, and maybe I did not properly probe the error. But it certainly is vim-fish which is causing the issue.
When I add an if
statement, and press <Enter>
, the end
keyword is added. So far so good. However, if the if
statement is indented already (or nested), i.e.: The i
of the if
and the e
of end
is not in column 0, and if I indent the selection with =
(in normal mode using ==
, or in visual mode), then the indentation completely breaks.
The breakage gets worse every time a block of code is indented, as shown in the screenshots.
It might be useful to be able to use vim-fish with the tiny and small Vim builds; we should check for the relevant features with has()
guards. Similarly, it could be useful to not require the latest version of Vim and at least support whatever old version is packaged for stable Linux distributions like Debian and Red Hat. This would mean fixing issues like #13.
It's debatable whether we should support running Vim in compatible
mode, which would mean things like adding &cpo
resets to every file.
Sometimes, when I edit fish files, I get this error many times:
Error detected while processing function fish#Complete:
line 8:
E484: Can't open file /tmp/vCliDT0/13
Press ENTER or type command to continue
What I did:
vim /tmp/test.fish
iif test -e "/ca
Then this error occurs after every character I type.
I also have vim-mucomplete
installed. So vim tries to autocomplete.
I've been loving using fish, but I've found that the startup time of this plugin is super slow, upwards of 5 seconds sometimes. I've pasted below a bit of the output of my vim --startuptime vim.log test.fish
command. Is there any way to improve the performance? I'm not sure if it's just me, but I'd definitely like to use this plugin without the startuptime lag
152.351 000.095 000.095: sourcing /usr/local/Cellar/neovim/0.1.2/share/nvim/runtime/plugin/vimballPlugin.vim
152.531 000.138 000.138: sourcing /usr/local/Cellar/neovim/0.1.2/share/nvim/runtime/plugin/zipPlugin.vim
152.600 002.106: loading plugins
152.606 000.006: inits 3
156.487 003.881: reading ShaDa
157.076 000.589: clearing screen
165.099 001.021 001.021: sourcing /usr/local/Cellar/neovim/0.1.2/share/nvim/runtime/scripts.vim
2122.220 1956.397 1956.397: sourcing /Users/Kyle/.config/nvim/bundle/vim-fish/ftplugin/fish.vim
2122.991 000.027 000.027: sourcing /Users/Kyle/.config/nvim/bundle/vim-fish/indent/fish.vim
2123.407 000.110 000.110: sourcing /Users/Kyle/.config/nvim/bundle/vim-fish/syntax/fish.vim
2123.910 000.191 000.191: sourcing /Users/Kyle/.config/nvim/bundle/vim-airline/autoload/airline/extensions.vim
when opening a fish file I get:
Error detected while processing /Users/miki725/.vim/plugged/vim-fish/ftplugin/fish.vim:
line 23:
E16: Invalid range: ----w
not sure how to debug this further. any ideas?
➜ nvim --version
NVIM v0.3.5
➜ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled May 20 2019 05:21:28)
A try to edit .fish file ends with the following error message:
"z.fish" 196L, 6779C
Error detected while processing ~/.vim/bundle/vim-fish/ftplugin/fish.vim:
line 22:
E484: Can't open file /tmp/v8jnFvB/0
After Enter I can edit a file anyway having syntax highlighting enabled. The latest vim-fish version installed using vundle.
Vim 7.4.027, fish 2.1.0, Fedora 18.
I get this error when startup.
"apt.show.url.fish" 3L, 162C^[[2;2R
Error detected while processing /home/alsan/.vim/bundle/vim-fish/ftplugin/fish.vim:
line 22:
E484: Can't open file /tmp/vK01IM9/0
Press ENTER or type command to continue
You can now modify the folding behaviour. But it'd be nice if there was an option to disable it completely.
echo $<C-x><C-o>
results in
echo $$history
etc
It would be nice to have support for foldmethod=syntax
or foldmethod=expr
. The latter is likely faster and lets the syntax file stay clean. At a minimum function
should be folded, but anything that end
terminates could be considered for folding.
After using it for a while I can only conclude that it's an annoyance, especially being put in Insert mode, and I've also since discovered better ways to work with funced in Vim. It might still be useful to do something like, move the cursor to the first line following a function start declaration, but stay in Normal mode and don't indent. The user then just has to hit S
(or cc
) to start Insert and indent.
The latter is always global, so we'll have to grab the lines and call fish_indent
manually in a formatexpr function instead.
I am sorry, but this is a basic question - not an issue
How on hell do you install this project in VIM?
For the novice it is far from trivial looking at the readme.
Please provide directions. I use spf13, anything special I should do?
Thank you
If I write even number of \
right before quotes, it will show as if I wanted to escape that quote
Minimal example:
'\\' ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.