rizzatti / dash.vim Goto Github PK
View Code? Open in Web Editor NEWSearch Dash.app from Vim
License: MIT License
Search Dash.app from Vim
License: MIT License
Not sure if it'd be a great idea, but have you considered adding the default list of keywords listed at http://kapeli.com/dash_plugins?
Currently <Plug>DashSearch
only takes the word under the cursor. Consider making this an operator so we can use text objects on it and also visual selections.
Getting this error when I am running DashSetting -
"E492: Not an editor command: DashSettings"
Here is the vim version I use -
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 3 2014 16:36:59)
MacOS X (unix) version
Included patches: 1-244
Dash 1.9.3 comes with a new way for plugins to call Dash and send over a list of keywords which Dash uses to enable/disable docsets.
This is all described at http://kapeli.com/dash_plugins.
In the next weeks I'll go through all plugins and update them myself, so expect a pull request regarding this. However, if you have some free time and want to do it yourself, feel free to do so ๐.
Note: please do not release a new version of the Vim plugin for at least 2-4 weeks, so that Dash users have time to update to 1.9.3.
I'm wondering if there are any ideas about integrating Dash database with neocomplete.vim. It seems like Dash.app could be a really good source of keywords for autocompletion, but I didn't find anything about it.
I'd like to not see Dash open up when I press the escape key. Any way to set this?
After installing dash.vim and funcoo.vim using pathogen, I'm given the following error:
dash.vim: dependencies are not met. please install funcoo.vim
It would seem pathogen is sourcing dash before funcoo. Running :scriptnames
confirms this:
...
25: ~/library/Application Support/vim/bundle/ctrlp/plugin/ctrlp.vim
26: ~/library/Application Support/vim/bundle/ctrlp/autoload/ctrlp/mrufiles.vim
27: ~/library/Application Support/vim/bundle/dash.vim/plugin/dash.vim
28: ~/library/Application Support/vim/bundle/detectindent/plugin/detectindent.vim
29: ~/library/Application Support/vim/bundle/funcoo.vim/plugin/funcoo.vim
30: ~/library/Application Support/vim/bundle/matchem/plugin/matchem.vim
31: ~/library/Application Support/vim/bundle/phpfolding.vim/plugin/phpfolding.vim
...
I can workaround the issue by temporarily renaming dash to something the follows funcoo alphabetically e.g. zash.
Any ideas how to solve this correctly?
Hey,
love the plugin.
Keep up the great work. :)
I found that i have a minor issue.
Tab Completion for Keywords is not working for me.
I have set keywords for my js files but when i press tab when writing
it is not completing to angularjs tried this with a variety of keywords.
:Dash searchterm ang
I'm getting errors from :DashKeywords
and based on what I read in issue #1 I figured the problem might be a space in a docset name docsetBundle = "jQuery UI";
so I deleted that docset but I only made things worse.
Now when I do :DashKeywords yii php mongodb
I get:
Error detected while processing function 229..239..240:
line 6:
E118: Too many arguments for function: sort
Error detected while processing function dash#keywords:
line 2:
E117: Unknown function: keywords
E116: Invalid arguments for function index(s:cache.keywords(), v:val) != -1
I've done a :BundleUpdate to no avail. My docsets and profiles are here: https://gist.github.com/perryclarke/35c9dcb6d786382e86e4
[I initially added this to issue #1 not realizing that was closed]
I'm using Vundle to manage my plugins.
Dash.vim seems to install ok, I can use :help dash but :Dash or :Dash! throw an editor command not found error.
I see no errors whatsoever when installing dash or opening vim. I'm using vim 7.4.52.
When using :Dash!
it does not use the mapping that was defined in the g:dash_map
Hash
Love the plugin. Sorry about using the issue queue. Just wanted to let you know.
https://www.youtube.com/watch?v=trGEGhitN4A&feature=youtu.be
Sorry if I missed it but I can't find a way to prevent a mouse click in Vim from popping open Dash. I like to have the variable for mouse set as mouse=a in my .vimrc. Is there an easy way to configure this? Thanks.
let g:dash_activate = 0 sounds good, i want to save my Commands+Tabs back to Vim.
But couldn't make it work. It's said if my Dash.app is in HUD mode, dash wont show.
how can i switch back to a Standard mode Dash.app?
MacBook Pro (13-inch, 2017)
version 10.14.2 (18C54)
Hi - I'm seeing the following when I invoke dash#search
in MacVim; working fine in console Vim. I see the same error whether I use the <leader>d
mapping or :Dash
directly. I do not see a problem if I invoke <leader>D
for Dash Global Search.
Error detected while processing function dash#search:
line 25:
E117: Unknown function: uniq
E116: Invalid arguments for function <SNR>94_search
Press ENTER or type command to continue
Version info:
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 26 2013 10:25:48)
MacOS X (unix) version
Included patches: 1-52
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +cmdline_info +emacs_tags -gettext -lua +mouse_urxvt +profile +statusline +transparency -X11
+arabic +comments +eval -hangul_input +menu +mouse_xterm +python -sun_workshop +user_commands -xfontset
+autocmd +conceal +ex_extra +iconv +mksession +multi_byte -python3 +syntax +vertsplit +xim
+balloon_eval +cryptv +extra_search +insert_expand +modify_fname +multi_lang +quickfix +tag_binary +virtualedit -xsmp
+browse +cscope +farsi +jumplist +mouse -mzscheme +reltime +tag_old_static +visual -xterm_clipboard
++builtin_terms +cursorbind +file_in_path +keymap +mouseshape +netbeans_intg +rightleft -tag_any_white +visualextra -xterm_save
+byte_offset +cursorshape +find_in_path +langmap +mouse_dec +odbeditor +ruby +tcl +viminfo -xpm
+cindent +dialog_con_gui +float +libcall -mouse_gpm +path_extra +scrollbind +terminfo +vreplace
+clientserver +diff +folding +linebreak -mouse_jsbterm +perl +signs +termresponse +wildignore
+clipboard +digraphs -footer +lispindent +mouse_netterm +persistent_undo +smartindent +textobjects +wildmenu
+cmdline_compl +dnd +fork() +listcmds +mouse_sgr +postscript -sniff +title +windows
+cmdline_hist -ebcdic +fullscreen +localmap -mouse_sysmouse +printer +startuptime +toolbar +writebackup
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
-I/System/Library/Frameworks/Tcl.framework/Headers -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_DARWIN_C_SOURCE=1
Linking: clang -L. -L/usr/local/lib -L. -L/usr/local/lib -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -F/System/Library/Frameworks -L/usr/loca
l/lib -o Vim -framework Cocoa -framework Carbon -lm -lncurses -liconv -framework Cocoa -fstack-protector -L/usr/local/lib -L/System/Library/Perl/5.16/darwin-thread-multi
-2level/CORE -lperl -framework Python -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -framework Ruby
Press ENTER or type command to continue
Currently dash.vim sort keywords before calling search: call s:search(term, sort(keywords))
. This behavior conflicts with dash plugin development guidelines: The keywords should be ordered based on how relevant they are.
As far as I can tell at https://github.com/rizzatti/dash.vim/blob/master/autoload/dash.vim#L153, the query that is sent to Dash is not percent-escaped/url encoded (i.e. what you'd get at http://meyerweb.com/eric/tools/dencoder/). It's not a huge bug, but it will cause issues if the query contains the &
character. At least &
should be escaped.
Hey,
Was wondering if you would be open to adding logic along the lines of:
let g:doc_reader = 'zeal' "
if has('macunix') " Use Mac's open to launch Dash
let g:doc_reader = 'open -g'
endif
and then change the s:search to
silent execute '!' . g:doc_reader . url
Then the plugin would work with Zeal on Linux (and possibly Windows?).
Happy to submit a PR but my vimscript needs work and although my changes work, I'm sure there is a better way of doing the above! ๐
Hi,
When I start Dash from a file in PHP to look for a function in Wordpress :
:Dash
Dash was opened with php doc or google search.
How can I improve that ?
Thanks
Hi,
After installing dash.vim I noticed a considerable impact on vim load time. Here are some entries created via vim --startuptime vim.log
.
1176.115 000.245 000.245: sourcing /Users/mark/.vim/bundle/dash.vim/autoload/dash/defaults.vim
1176.316 001.278 001.033: sourcing /Users/mark/.vim/bundle/dash.vim/autoload/dash.vim
1177.053 554.418 553.140: sourcing /Users/mark/.vim/bundle/dash.vim/plugin/dash.vim
Notice that loading dash.vim takes 553.140
. On my setup, that's 2 orders of magnitude longer than any other plugin. I'm guessing it's because you're running /script/check_for_dash.sh on every vim load.
Is doing this check at boot really required?
Really like your plugin so far, cool work!
Just one thing: Is it possible to set multiple docsets for a language in g:dash_map
, e.g. like this?
let g:dash_map = {
\ 'javascript' : 'backbone javascript jquery',
\ 'coffee' : 'backbone underscore coffee javascript jquery'
\ }
If not, it would be really cool to have this feature :)
When I use DashKeywords I get the following error message that looks similar as the one in #1:
Error detected while processing function dash#keywords:
line 2:
E117: Unknown function: keywords
E116: Invalid arguments for function index(s:cache.keywords(), v:val) != -1
I installed the plugin with Pathogen. This is the output of defaults read com.kapeli.dash docsets and this is the output of defaults read com.kapeli.dash profiles.
vim-doc.herokuapp.com is broken
After having updated yesterday (and again today) the following error is coming from Dash.vim whenever starting Vim:
Error detected while processing function dash#add_keywords_for_filetype..<SNR>130_add_buffer_keywords:
line 2:
E117: Unknown function: keywords
E116: Invalid arguments for function index(s:cache.keywords(), v:val) != -1
dash.vim calls Dash by opening a dash://
URL. The problem is that the system forces Dash to become active when this URL is opened.
Currently, this is not an issue. However, a future update of Dash will add support for iOS remotes. While an iOS remote is connected, extensions are redirected to it directly and Dash on OS X is not shown at all. Unfortunately there's no way for me to prevent the system from activating Dash when you open the dash://
URL.
Instead of doing this:
open dash://query
Can you do this?
open -g dash://query
The -g
causes Dash to not get activated if it does not want to and the user experience is a lot better as the active app does not lose focus anymore.
It is safe to make this change as soon as possible (no need to wait for a Dash update), as the current version of Dash already knows to activate itself if it needs to.
Dash is set to open with the open
command using execute
which flickers the screen because it has to run that command, load dash and redraw the screen. This is slightly annoying tbh.
Fix would be to run the open
command as a background job where available and of course, default to the current behavior when not.
I get this error when trying to use the DashKeywords command
Error detected while processing function dash#keywords:
line 2:
E117: Unknown function: keywords
E116: Invalid arguments for function index(s:cache.keywords(), v:val) != -1
It would be awesome if this plugin could integrate snippets into vim as well. Perhaps somehow integrate with snipmate if necessary. I'd love to start using Dash for snippets but not being able to use them within vim makes them pretty much useless.
If there is some way to do this currently I'd love to know
Thanks
Please add version tags so this can be used with vim-flavor.
This is simple as creating a GitHub Release or just adding a tag, like v1.0, to your repo. See vim-flavor for more info.
Dash.vim would add nearly 15ms to my vim start time, it's my second slowest plugin.
When I get the unname check removed, the loading time would be less than 1ms.
I think it's not necessary to avoid loading the script by check the uname, it should be fine if the script get loaded but could not works.
This check slows down vim instead of make vim faster.
When I type :Dash. it opens Dash app and shows the doc. But it closes the vim. What am I doing wrong here?
This link here
Error detected while processing function dash#settings:
line 2:
E121: Undefined variable: profiles
E15: Invalid expression: s:cache.profiles
line 7:
E121: Undefined variable: docsets
E15: Invalid expression: s:cache.docsets
Hi there!
Currently I had introduced a nasty hack in my dash#search(bang, ...)
function: at the end of it I had added:
sleep 200m
call foreground()
which effectively searches for a term in Dash and then focuses MacVim window back, saving me the need to press Option-Tab to go back. That relatively minor change makes the whole flow of displaying documentation way swifter.
If you could provide me with some guidance for finding a proper solution for this (and if you think that this is a worthy feature), I might work on adding :DashBack
function (or something like that) which bounces back to MacVim window after searching.
What's your opinion about this?
Cheers!
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.