Open Aeromus opened 2 years ago
:Crystal*
commands are defined in buffer local. They are only defined when you open a buffer with ft=crystal
(the file name ends with .cr
). Otherwise they won't be defined.
I am working with .cr files and even vim appears to recognize the open files as crystal but the :Crystal*
commands still do not appear to be loading in properly
It's weird because it means ftplugin is not loaded though a filetype is set properly. Can you check vim-crystal/ftplugin/
directory exists in your local?
And can you check the output from
:echo exists('b:did_ftplugin')
after loading a .cr
file?
The result of :echo exists('b:did_ftplugin')
shows as 0 in vim. And inside my .vim directory there is a ftplugin it just does not reside under a vim-crystal directory
Sorry accidentally hit the close button
The result of :echo exists('b:did_ftplugin') shows as 0 in vim.
So it means ftplugin is not loaded.
And inside my .vim directory there is a ftplugin it just does not reside under a vim-crystal directory
So ~/.vim/bundle/vim-crystal/ftplugin
exists, am I correct?
Would you share the following information if you are ok?
tree -L 3 ~/.vim/bundle/
command in your terminal:set runtimepath
in your VimCorrect ~/.vim/bundle/vim-crystal/ftplugin
does exist
Output of tree -L 3 ~/.vim/bundle/
/home/andrew/.vim/bundle
├── ag.vim
│ ├── autoload
│ │ └── ag.vim
│ ├── doc
│ │ ├── ag.txt
│ │ └── tags
│ ├── plugin
│ │ └── ag.vim
│ ├── Rakefile
│ └── README.md
├── ctrlp.vim
│ ├── autoload
│ │ ├── ctrlp
│ │ └── ctrlp.vim
│ ├── doc
│ │ ├── ctrlp.txt
│ │ └── tags
│ ├── plugin
│ │ └── ctrlp.vim
│ └── readme.md
├── delimitMate
│ ├── autoload
│ │ └── delimitMate.vim
│ ├── basic_vimrc
│ ├── doc
│ │ ├── delimitMate.txt
│ │ └── tags
│ ├── Makefile
│ ├── plugin
│ │ └── delimitMate.vim
│ ├── README.md
│ └── test
│ ├── autoclose_matchpairs.txt
│ ├── autoclose_matchpairs.vim
│ ├── autoclose_quotes.txt
│ ├── autoclose_quotes.vim
│ ├── eol_marker.vim
│ ├── expand_cr.txt
│ ├── expand_cr.vim
│ ├── expand_space.txt
│ ├── expand_space.vim
│ ├── first_buffer_no_ft.vim
│ ├── Makefile
│ ├── README.md
│ └── _setup.vim
├── html5.vim
│ ├── after
│ │ └── syntax
│ ├── autoload
│ │ ├── htmlcomplete.vim
│ │ └── xml
│ ├── CHANGES.markdown
│ ├── config.mk
│ ├── ftplugin
│ │ └── html.vim
│ ├── indent
│ │ └── html.vim
│ ├── Makefile
│ ├── README.md
│ └── syntax
│ ├── html
│ ├── html.vim
│ └── javascript
├── iceberg-dark
│ ├── autoload
│ │ ├── airline
│ │ └── lightline
│ ├── iceberg-dark-powerline.json
│ ├── LICENSE
│ ├── README.md
│ └── screenshots
│ ├── airline.png
│ ├── airline_tmux.png
│ ├── bumblebee.png
│ ├── code_snippet.png
│ ├── lightline_new.png
│ ├── lightline_old.png
│ ├── lightline_tmux.png
│ ├── tmux_minimal.png
│ ├── tmux_powerline.png
│ ├── tmux_rounded.png
│ └── tmux_slanted.png
├── indentLine
│ ├── after
│ │ ├── plugin
│ │ └── syntax
│ ├── doc
│ │ ├── indentLine.txt
│ │ └── tags
│ ├── glyph
│ │ └── indentLine-dotted-guide.eps
│ ├── LICENSE
│ └── README.md
├── nerdtree
│ ├── autoload
│ │ ├── nerdtree
│ │ └── nerdtree.vim
│ ├── CHANGELOG.md
│ ├── _config.yml
│ ├── doc
│ │ ├── NERDTree.txt
│ │ └── tags
│ ├── lib
│ │ └── nerdtree
│ ├── LICENCE
│ ├── nerdtree_plugin
│ │ ├── exec_menuitem.vim
│ │ ├── fs_menu.vim
│ │ └── vcs.vim
│ ├── plugin
│ │ └── NERD_tree.vim
│ ├── README.markdown
│ ├── screenshot.png
│ └── syntax
│ └── nerdtree.vim
├── nyancat-vim
│ ├── autoload
│ │ ├── nyancat2.vim
│ │ └── nyancat.vim
│ ├── images
│ │ ├── frame2-1.txt
│ │ ├── frame2-2.txt
│ │ ├── frame2-3.txt
│ │ ├── frame2-4.txt
│ │ ├── frame2-5.txt
│ │ ├── frame2-6.txt
│ │ └── pattern2.txt
│ ├── LICENSE
│ ├── nyancat2.vim
│ ├── nyancat.vim
│ ├── plugin
│ │ └── nyancat.vim
│ └── README.mkd
├── supertab
│ ├── doc
│ │ ├── supertab.txt
│ │ └── tags
│ ├── ftplugin
│ │ ├── html.vim
│ │ └── xml.vim
│ ├── Makefile
│ ├── plugin
│ │ └── supertab.vim
│ └── README.rst
├── tcomment_vim
│ ├── addon-info.json
│ ├── autoload
│ │ ├── tcomment
│ │ └── tcomment.vim
│ ├── CHANGES.TXT
│ ├── doc
│ │ ├── tags
│ │ └── tcomment.txt
│ ├── etc
│ │ └── tpl_tcomment.txt
│ ├── LICENSE.TXT
│ ├── plugin
│ │ └── tcomment.vim
│ ├── README
│ └── spec
│ └── tcomment
├── vim-airline
│ ├── autoload
│ │ ├── airline
│ │ └── airline.vim
│ ├── CHANGELOG.md
│ ├── CONTRIBUTING.md
│ ├── doc
│ │ ├── airline.txt
│ │ └── tags
│ ├── Gemfile
│ ├── LICENSE
│ ├── plugin
│ │ └── airline.vim
│ ├── Rakefile
│ ├── README.md
│ └── t
│ ├── airline.vim
│ ├── builder.vim
│ ├── commands.vim
│ ├── extensions_default.vim
│ ├── extensions_tabline.vim
│ ├── highlighter.vim
│ ├── init.vim
│ ├── parts.vim
│ ├── section.vim
│ ├── themes.vim
│ └── util.vim
├── vim-airline-themes
│ ├── autoload
│ │ └── airline
│ ├── doc
│ │ ├── airline-themes.txt
│ │ └── tags
│ ├── LICENSE
│ ├── plugin
│ │ └── airline-themes.vim
│ ├── README.md
│ └── test
│ └── airline-themes.vader
├── vim-crystal
│ ├── autoload
│ │ ├── crystal
│ │ ├── crystal_lang.vim
│ │ ├── ecrystal.vim
│ │ └── vital
│ ├── ftdetect
│ │ ├── crystal.vim
│ │ └── ecrystal.vim
│ ├── ftplugin
│ │ ├── crystal.vim
│ │ └── ecrystal.vim
│ ├── indent
│ │ ├── crystal.vim
│ │ └── ecrystal.vim
│ ├── LICENSE.txt
│ ├── plugin
│ │ └── crystal.vim
│ ├── README.md
│ ├── syntax
│ │ ├── crystal.vim
│ │ └── ecrystal.vim
│ └── syntax_checkers
│ └── crystal
├── vim-css3-syntax
│ ├── after
│ │ └── syntax
│ ├── README.md
│ └── test
│ └── test.css
├── vim-css-color
│ ├── after
│ │ └── syntax
│ ├── autoload
│ │ └── css_color.vim
│ ├── LICENSE
│ ├── README.md
│ ├── syntax
│ │ └── colornames
│ └── tests
│ ├── bench
│ ├── example.csh
│ ├── example.css
│ ├── example.fish
│ ├── example.jsx
│ ├── example.less
│ ├── example.nix
│ ├── example.sass
│ ├── example.scss
│ ├── example.sh
│ ├── example.stylus
│ ├── example.tcsh
│ ├── example.ts
│ ├── example.tsx
│ ├── example.zsh
│ └── torture.css
├── vim-endwise
│ ├── CONTRIBUTING.markdown
│ ├── plugin
│ │ └── endwise.vim
│ └── README.markdown
├── vim-fugitive
│ ├── autoload
│ │ └── fugitive.vim
│ ├── CONTRIBUTING.markdown
│ ├── doc
│ │ ├── fugitive.txt
│ │ └── tags
│ ├── ftdetect
│ │ └── fugitive.vim
│ ├── ftplugin
│ │ └── fugitiveblame.vim
│ ├── plugin
│ │ └── fugitive.vim
│ ├── README.markdown
│ └── syntax
│ ├── fugitiveblame.vim
│ └── fugitive.vim
├── vim-json
│ ├── ftdetect
│ │ └── json.vim
│ ├── ftplugin
│ │ └── json.vim
│ ├── indent
│ │ └── json.vim
│ ├── jsonl-test.jsonl
│ ├── jsonp-test.jsonp
│ ├── json-test.json
│ ├── license.md
│ ├── readme.md
│ └── syntax
│ └── json.vim
├── vim-markdown
│ ├── ftdetect
│ │ └── markdown.vim
│ ├── ftplugin
│ │ └── markdown.vim
│ ├── README.markdown
│ └── syntax
│ └── markdown.vim
├── vim-qargs
│ ├── plugin
│ │ └── qargs.vim
│ └── README.md
├── vim-ragtag
│ ├── CONTRIBUTING.markdown
│ ├── doc
│ │ ├── ragtag.txt
│ │ └── tags
│ ├── plugin
│ │ └── ragtag.vim
│ └── README.markdown
├── vim-rainbow
│ ├── plugin
│ │ └── rainbow.vim
│ └── README.md
├── vim-ruby
│ ├── autoload
│ │ └── rubycomplete.vim
│ ├── ChangeLog
│ ├── compiler
│ │ ├── eruby.vim
│ │ ├── rake.vim
│ │ ├── rspec.vim
│ │ ├── rubyunit.vim
│ │ └── ruby.vim
│ ├── CONTRIBUTORS
│ ├── doc
│ │ ├── ft-ruby-indent.txt
│ │ ├── ft-ruby-omni.txt
│ │ ├── ft-ruby-plugin.txt
│ │ ├── ft-ruby-syntax.txt
│ │ └── tags
│ ├── etc
│ │ └── examples
│ ├── ftdetect
│ │ ├── ruby_extra.vim
│ │ └── ruby.vim
│ ├── ftplugin
│ │ ├── eruby.vim
│ │ └── ruby.vim
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── indent
│ │ ├── eruby.vim
│ │ └── ruby.vim
│ ├── INSTALL.markdown
│ ├── NEWS
│ ├── README.markdown
│ ├── spec
│ │ ├── indent
│ │ ├── spec_helper.rb
│ │ ├── syntax
│ │ └── vim
│ └── syntax
│ ├── eruby.vim
│ └── ruby.vim
├── vim-surround
│ ├── doc
│ │ ├── surround.txt
│ │ └── tags
│ ├── plugin
│ │ └── surround.vim
│ └── README.markdown
├── vim-visual-multi
│ ├── autoload
│ │ ├── vm
│ │ └── vm.vim
│ ├── doc
│ │ ├── tags
│ │ ├── visual-multi.txt
│ │ ├── vm-ex-commands.txt
│ │ ├── vm-faq.txt
│ │ ├── vm-mappings.txt
│ │ ├── vm-settings.txt
│ │ ├── vm-troubleshooting.txt
│ │ └── vm-tutorial
│ ├── LICENSE
│ ├── plugin
│ │ └── visual-multi.vim
│ ├── python
│ │ └── vm.py
│ ├── README.md
│ ├── run_tests
│ ├── test
│ │ ├── default
│ │ ├── README.md
│ │ ├── requirements.txt
│ │ ├── test.py
│ │ └── tests
│ └── tutorialrc
└── Vundle.vim
├── autoload
│ ├── vundle
│ └── vundle.vim
├── changelog.md
├── CONTRIBUTING.md
├── doc
│ ├── tags
│ └── vundle.txt
├── ftplugin
│ └── vundlelog.vim
├── LICENSE-MIT.txt
├── README_KR.md
├── README.md
├── README_ZH_CN.md
├── README_ZH_TW.md
├── syntax
│ └── vundlelog.vim
└── test
├── files
├── minirc.vim
└── vimrc
153 directories, 260 files
Output of :set runtimepath
runtimepath=~/.vim,~/.vim/bundle/Vundle.vim,~/.vim/bundle/vim-markdown,~/.vim/
bundle/vim-fugitive,~/.vim/bundle/supertab,~/.vim/bundle/vim-ruby,~/.vim/bundle/
vim-crystal,~/.vim/bundle/vim-endwise,~/.vim/bundle/vim-ragtag,~/.vim/bundle/ctr
lp.vim,~/.vim/bundle/vim-qargs,~/.vim/bundle/html5.vim,~/.vim/bundle/delimitMate
,~/.vim/bundle/tcomment_vim,~/.vim/bundle/vim-airline,~/.vim/bundle/vim-airline-
themes,~/.vim/bundle/nyancat-vim,~/.vim/bundle/vim-css-color,~/.vim/bundle/vim-c
ss3-syntax,~/.vim/bundle/indentLine,~/.vim/bundle/vim-visual-multi,~/.vim/bundle
/vim-json,~/.vim/bundle/nerdtree,~/.vim/bundle/vim-rainbow,~/.vim/bundle/vim-sur
round,~/.vim/bundle/iceberg-dark,~/.vim/bundle/ag.vim,/var/lib/vim/addons,/etc/v
im,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/e
tc/vim/after,/var/lib/vim/addons/after,~/.vim/after,~/.vim/bundle/Vundle.vim,~/.
vim/bundle/Vundle.vim/after,~/.vim/bundle/vim-markdown/after,~/.vim/bundle/vim-f
ugitive/after,~/.vim/bundle/supertab/after,~/.vim/bundle/vim-ruby/after,~/.vim/b
undle/vim-crystal/after,~/.vim/bundle/vim-endwise/after,~/.vim/bundle/vim-ragtag
/after,~/.vim/bundle/ctrlp.vim/after,~/.vim/bundle/vim-qargs/after,~/.vim/bundle
/html5.vim/after,~/.vim/bundle/delimitMate/after,~/.vim/bundle/tcomment_vim/afte
r,~/.vim/bundle/vim-airline/after,~/.vim/bundle/vim-airline-themes/after,~/.vim/
bundle/nyancat-vim/after,~/.vim/bundle/vim-css-color/after,~/.vim/bundle/vim-css
3-syntax/after,~/.vim/bundle/indentLine/after,~/.vim/bundle/vim-visual-multi/aft
er,~/.vim/bundle/vim-json/after,~/.vim/bundle/nerdtree/after,~/.vim/bundle/vim-r
ainbow/after,~/.vim/bundle/vim-surround/after,~/.vim/bundle/iceberg-dark/after,~
/.vim/bundle/ag.vim/after
Output of
vim --version
ornvim --version
vim-crystal configuration in your
.vimrc
No actual configuration for vim crystal outside of
Plugin 'rhysd/vim-crystal'
for Vundle.Steps to reproduce
Installation either via copying the files into ~./vim as described in README or via Vundle does not appear to install vim-crystal properly. Crystal commands such as
:CrystalFormat
do not work / load and vim gives "Not and editor command"Expected behavior
Vim-Crystal commands work
Actual behavior
All vim-crystal commands give "Not an editor command" when attempted to be run. It appears that vim-crystal is atleast partially installed correctly as syntax highlighting does work
Additional information
The information in issue 47 does not appear to help in my case
Results of crystal --version Crystal 1.1.1 [6d9a1d583] (2021-07-26)
LLVM: 10.0.1 Default target: x86_64-unknown-linux-gnu