slim-template / vim-slim Goto Github PK
View Code? Open in Web Editor NEWSyntax highlighting for VIM
License: MIT License
Syntax highlighting for VIM
License: MIT License
this here is not rendered correctly:
a{:href => url("/#{e.short}")}
it'll color the first {
and the first }
UPDATE
ok, this was via the haml2slim converter and not exactly slim syntax. Just figured that out. But the nesting should work anyway.
Running MacVim 7.3 (62) with Janus (https://github.com/carlhuda/janus) and vim-slim.
Navigating a 241 line slim file is slow and painful. Disabling vim-slim and having no syntax highlighting speeds things right up.
Anyone else experiencing this?
I'm not sure if this is the fault of the syntax file or not. I've tried in both NERDCommenter and vim-commentary to make comments in a slim template and both render the same (incorrect way).
This line:
= breadcrumb_to 'New Plan'
becomes this:
/* = breadcrumb_to 'New Plan' */
According to the docs, it should be (I believe)
/ = breadcrumb_to 'New Plan'
Let me know if I'm on the right track or if this is doesn't belong here. Thanks.
If you take a look at HAML highlighting in VIM you'll see that in expression like:
= link_to ...
helper link_to
will be highlighted via ruby/rails syntax highlighter. This feature is missing for Slim.
Is this project abandoned?
Trying to get this working with spf13-vim setup. Can't get it to syntax highlight. Added Bundle 'slim-template/vim-slim.git'
to the vimrc.bundles.local
file and bundle installed to no avail.
I like your bundle, but I can't find the license. You have a bunch of commits from different people, they technically need to agree to whatever license you pick -- the longer you wait the more difficult it might get to retroactively slap a license on the project.
Or am I missing something?
here's my setup:
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'slim-template/vim-slim'
call vundle#end() " required
filetype plugin indent on " required
How about some install instructions?
I was editing my Rails application layout file in Vim 7.3 with this vim-slim plugin installed and noticed that Vim was using a filetype of HTML instead of Slim for my application.html.slim file and not providing syntax highlighting.
My other views that followed the *.html.slim naming convention were correctly using the Slim filetype and syntax.
The culprit seemed to be the first line of the file, which was doctype html
. I changed it to the equivalent doctype 5
and now Vim correctly sets the filetype to Slim for this file.
When using html5 data attributes syntax highlight is only applied to some of the attribute name.
E.g.:
h1 data-my-attribute="some value" Heading
Only data
is colored and -my-attribute
is not
This was patched in vim and neovim.
Tab key in INSERT mode tends to jump around in the document instead of indent... Planned behavior, or bug?
Is it just me or is syntax highlighting not working since #22?
script src="#{{asset_path('application.js')}}"
messes up all the highlighting below it.
Hi, syntax highlighting doesn't work for my Vundle set up. Does it only happen for me or everyone? Thanks in advance.
Here is my vimrc
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'kana/vim-textobj-user'
Plugin 'nelstrom/vim-textobj-rubyblock'
Plugin 'kien/ctrlp.vim' "Ctrl + p to find your file
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-dispatch'
Plugin 'tpope/vim-surround'
Plugin 'vim-scripts/tComment'
Plugin 'ervandew/supertab'
Plugin 'jiangmiao/auto-pairs'
Plugin 'mileszs/ack.vim'
Plugin 'ngmy/vim-rubocop'
Plugin 'slim-template/vim-slim'
" Auto-save
Plugin 'vim-scripts/vim-auto-save'
let g:auto_save = 1
let g:auto_save_in_insert_mode = 0
" Disable auto-save in Python
autocmd FileType python let g:auto_save=0
" For polygloting programming
" Plugin 'sheerun/vim-polyglot'
" Ruby Plugins
Plugin 'tpope/vim-rails'
Plugin 'vim-ruby/vim-ruby'
Plugin 'tpope/vim-endwise'
Plugin 'jgdavey/vim-blockle'
Bundle 'thoughtbot/vim-rspec'
" Multiple Cursors
Plugin 'terryma/vim-multiple-cursors'
" File Browser Plugin
Plugin 'scrooloose/nerdtree'
let g:NERDTreeShowHidden = 1
let g:NERDTreeMinimalUI = 1
let g:NERDTreeAutoDeleteBuffer = 1
call vundle#end() " required
syntax enable
filetype plugin indent on
Would be nice to support (like vim jade) this slim syntax:
p: a(href="foo") bar
Thanks!
If you take a look at my screenshot you'll see after the variable the highlighting stops https://db.tt/QhwYdfff
.x< attr=""
expected behaviour: attr=""
is highlighted
actual behaviour: it's not highlighted
urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"
In this example, xmlns:xhtml
and its associated value should be highlighted, but they are not.
The new code output line indicators came with commit https://github.com/stonean/slim/commit/24941ea96e261a60545e402915a4b80b191c9b2a
=' this_ruby_code.treated_as("unclosed string")
After I installed this plugin, invisible chars in *.slim files are not shown. How can I enable invisible chars?
I spent a lot of time as a Vim newbie trying to work out why the syntax highlighting was not being applied to my slim files, the solution is here https://github.com/kchmck/vim-coffee-script#install-using-vundle as per CoffeeScript, perhaps the readme could mention something like this also?
Hi ,
do you want to transfer this repo to the slim-template organization? I will give you access there if you want.
Daniel (@minad, for the Slim team)
well, non-standard tags are not highlighted. So using polymer with vim-slim is a difficult thing
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.