Giter Club home page Giter Club logo

vim-less's People

Contributors

adagios avatar anthonydisanti avatar dhruvasagar avatar groenewege avatar jdost avatar juanpabloaj avatar laughinghan avatar leonardehrenfried avatar rodnaph avatar rwatkins avatar rwstauner avatar sebkoller avatar suy avatar tremby avatar vitalk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-less's Issues

Not indenting anymore ?

Is there any reason that my VIM doesn't indent anything even a simple code with an unformated line like :

h2 {
  text-align:center;
font-size:11px;
  margin:0;
  text-transform:none;
  letter-spacing:0;
}

I can't do anything (gg=G or select text then =) to indent it.

I use gVim 7.4 and it worked before upgrading with vundle.
I tried to disable every other plugins with no luck.

Edit : this is a real issue due to 874a48d
All versions before this commit work for me

value with quotation

value with quotation will fail to analysis ;eg: font-family:"Microsoft YaHei";

vim73 indentation of mixins

hi there. thanks for this awesome plugin. i'm a less noob so i hope this isn't just a dumb less mistake. for some reason vim-less doesn't seem to be indenting mixins. for example the following:

.my-mixin {
  background:#fff;
}

when mixed in doesn't indent inside the parent:

.some-class {
.my-mixin;
}

is this intentional? thanks again and keep up the good work! :)

error with MAP

Hi,
When I source the .vimrc, I have some error ?
source ~/.vimrc
/Users/xartot/.vimrc:1: command not found: syn
/Users/xartot/.vimrc:4: command not found: filetype
/Users/xartot/.vimrc:6: command not found: filetype
/Users/xartot/.vimrc:8: parse error near `<'

here my config:
1 syn on
2 execute pathogen#infect()
3 set syntax=on
4 filetype indent plugin on
5
6 filetype on
7
8 nnoremap m :w !lessc % > %:t:r.css

Thanks

vim-css-color compatibility issues

For some reason vim-css-color does not seem to highlight colors in my LESS files when using vim-less. I installed both vim-less and vim-css-color (and other plugins) using Pathogen.

Aside from the vim-css-color issue, vim-less appears to be working as expected.

-- Update --

Oddly this only seems to happen with certain named colors. For instance, red, blue, and green do not get highlighted but purple, orange, and yellow do. If I copy the exact same code to a CSS file instead of a LESS file all of the colors (red, blue, green, purple, orange, and yellow) are highlighted as expected. Hex colors seem to be working fine though.

Folding issue with nested rules on same line

Apparently having the following rule structure, causes the code folding to break.

ul {
    li { display: block; padding: .5em; a { color: red; } } 
    h4 { color: red; }
} 

folded looks like:

+ul {...li { display: block; padding: .5em; a { color: red; } }                                    
    h4 { color: red; }
} 

the only way to grant the code-folding will be correct is to split nested rules into different lines such as:

ul {
    li { display: block; padding: .5em;
        a { color: red; }
    } 
    h4 { color: red; }
} 

which properly folds to

+ul {...} 

Highlighting doesn't work

Is there any reason, why this plugin may not work? I'm using MacVim 7.3.315 with Solarized theme, plugin is installed using pathogen.

Here is a list of plugins I'm having installed:

delimitMate
vim-coffee-script
vim-haskell
vim-ragtag
vimroom
nerdtree
vim-colors-solarized
vim-indexed-search
vim-rails
syntastic
vim-endwise
vim-less
vim-surround
tabular
vim-fugitive
vim-markdown
vim-unimpaired

Thanks.
Alex

correct nnoremap for .vimrc

nnoremap ,m :w <BAR> !lessc % > %:t:r.css<CR><space>
it is incorrect for open fullpath less, such as vim static/css/base.less
And press ,m, the base.css file vim ouput in static directory

so, you should use: nnoremap ,m :w <BAR> !lessc % > %:p:r.css<CR><space>

Highlighting doesn't work automatically with VIM74+vundle

Hi,
I just installed vim-less via vundle, but the syntax highlighting doesn't work automatically.

I've read the issue #6 and tried to do the same thing, but still doesn't work.

When I set the filetype manually it works.

After opening a .less file, the output for :scriptnames is:

  1: /usr/share/vim/vimrc
  2: /usr/share/vim/vim74/debian.vim
  3: /usr/share/vim/vim74/syntax/syntax.vim
  4: /usr/share/vim/vim74/syntax/synload.vim
  5: /usr/share/vim/vim74/syntax/syncolor.vim
  6: /usr/share/vim/vim74/filetype.vim
  7: ~/.vimrc
  8: ~/.vim/myconfs.vim
  9: /usr/share/vim/vim74/syntax/nosyntax.vim
 10: ~/.vim/vundle.vim
 11: ~/.vim/bundle/vundle/autoload/vundle.vim
 12: ~/.vim/bundle/vundle/autoload/vundle/config.vim
 13: ~/.vim/bundle/YouCompleteMe/plugin/youcompleteme.vim
 14: ~/.vim/bundle/emmet-vim/plugin/emmet.vim
 15: ~/.vim/bundle/syntastic/plugin/syntastic/autoloclist.vim
 16: ~/.vim/bundle/syntastic/plugin/syntastic/balloons.vim
 17: ~/.vim/bundle/syntastic/plugin/syntastic/checker.vim
 18: ~/.vim/bundle/syntastic/plugin/syntastic/cursor.vim
 19: ~/.vim/bundle/syntastic/plugin/syntastic/highlighting.vim
 20: ~/.vim/bundle/syntastic/plugin/syntastic/loclist.vim
 21: ~/.vim/bundle/syntastic/plugin/syntastic/modemap.vim
 22: ~/.vim/bundle/syntastic/plugin/syntastic/notifiers.vim
 23: ~/.vim/bundle/syntastic/plugin/syntastic/registry.vim
 24: ~/.vim/bundle/syntastic/plugin/syntastic/signs.vim
 25: ~/.vim/bundle/syntastic/plugin/syntastic.vim
 26: ~/.vim/bundle/syntastic/autoload/syntastic/log.vim
 27: ~/.vim/bundle/syntastic/autoload/syntastic/util.vim
 28: /usr/share/vim/vim74/plugin/getscriptPlugin.vim
 29: /usr/share/vim/vim74/plugin/gzip.vim
 30: /usr/share/vim/vim74/plugin/matchparen.vim
 31: /usr/share/vim/vim74/plugin/netrwPlugin.vim
 32: /usr/share/vim/vim74/plugin/rrhelper.vim
 33: /usr/share/vim/vim74/plugin/spellfile.vim
 34: /usr/share/vim/vim74/plugin/tarPlugin.vim
 35: /usr/share/vim/vim74/plugin/tohtml.vim
 36: /usr/share/vim/vim74/plugin/vimballPlugin.vim
 37: /usr/share/vim/vim74/plugin/zipPlugin.vim
 38: ~/.vim/bundle/powerline/powerline/bindings/vim/plugin/powerline.vim
 39: /usr/share/vim/vim74/scripts.vim
 40: ~/.vim/bundle/YouCompleteMe/autoload/youcompleteme.vim

After setting ft=less, the output for :scriptnames is:

  1: /usr/share/vim/vimrc
  2: /usr/share/vim/vim74/debian.vim
  3: /usr/share/vim/vim74/syntax/syntax.vim
  4: /usr/share/vim/vim74/syntax/synload.vim
  5: /usr/share/vim/vim74/syntax/syncolor.vim
  6: /usr/share/vim/vim74/filetype.vim
  7: ~/.vimrc
  8: ~/.vim/myconfs.vim
  9: /usr/share/vim/vim74/syntax/nosyntax.vim
 10: ~/.vim/vundle.vim
 11: ~/.vim/bundle/vundle/autoload/vundle.vim
 12: ~/.vim/bundle/vundle/autoload/vundle/config.vim
 13: ~/.vim/bundle/YouCompleteMe/plugin/youcompleteme.vim
 14: ~/.vim/bundle/emmet-vim/plugin/emmet.vim
 15: ~/.vim/bundle/syntastic/plugin/syntastic/autoloclist.vim
 16: ~/.vim/bundle/syntastic/plugin/syntastic/balloons.vim
 17: ~/.vim/bundle/syntastic/plugin/syntastic/checker.vim
 18: ~/.vim/bundle/syntastic/plugin/syntastic/cursor.vim
 19: ~/.vim/bundle/syntastic/plugin/syntastic/highlighting.vim
 20: ~/.vim/bundle/syntastic/plugin/syntastic/loclist.vim
 21: ~/.vim/bundle/syntastic/plugin/syntastic/modemap.vim
 22: ~/.vim/bundle/syntastic/plugin/syntastic/notifiers.vim
 23: ~/.vim/bundle/syntastic/plugin/syntastic/registry.vim
 24: ~/.vim/bundle/syntastic/plugin/syntastic/signs.vim
 25: ~/.vim/bundle/syntastic/plugin/syntastic.vim
 26: ~/.vim/bundle/syntastic/autoload/syntastic/log.vim
 27: ~/.vim/bundle/syntastic/autoload/syntastic/util.vim
 28: /usr/share/vim/vim74/plugin/getscriptPlugin.vim
 29: /usr/share/vim/vim74/plugin/gzip.vim
 30: /usr/share/vim/vim74/plugin/matchparen.vim
 31: /usr/share/vim/vim74/plugin/netrwPlugin.vim
 32: /usr/share/vim/vim74/plugin/rrhelper.vim
 33: /usr/share/vim/vim74/plugin/spellfile.vim
 34: /usr/share/vim/vim74/plugin/tarPlugin.vim
 35: /usr/share/vim/vim74/plugin/tohtml.vim
 36: /usr/share/vim/vim74/plugin/vimballPlugin.vim
 37: /usr/share/vim/vim74/plugin/zipPlugin.vim
 38: ~/.vim/bundle/powerline/powerline/bindings/vim/plugin/powerline.vim
 39: /usr/share/vim/vim74/scripts.vim
 40: ~/.vim/bundle/YouCompleteMe/autoload/youcompleteme.vim
 41: /usr/share/vim/vim74/syntax/vim.vim
 42: /usr/share/vim/vim74/syntax/python.vim
 43: ~/.vim/bundle/vim-less/syntax/less.vim
 44: /usr/share/vim/vim74/syntax/css.vim

Looking at it I noticed the only vim-less file loaded is vim-less/syntax/less.vim, and only after the filetype is set manually.

No Autocomplete

How does autocomplete work? Is there a key combo? I'm unsure if its working or not.

Bad Indention

There seems to be an issue with indention. This is the simplest example I could come up with. I have this formatted LESS:

td > table.sub {
    width: 100%;
    * {
        padding: 0;
    }
}

Formatting with = causes:

td > table.sub {
    width: 100%;
           * {
               padding: 0;
           }
       }

Illegal character <j>

I have just install the vim-less without any config.

But when I open a empty or not .less file.

it will alway show some error at the bottom, and disappear after a while.

and the plugin will work.

this is the error:

image

and this is the code that has error in less.vim. But I dont know the syntax

setlocal omnifunc=csscomplete#CompleteCSS
setlocal suffixesadd=.less
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,://
setlocal fo=jcroql  // this is where error happens

let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\='

My System is OSX 10.10.4
and the version of vim is: 7.3

Wrong indentation with nested properties

I'm using vim-less vim bundle to autoindent my .less files in vim. The problem is that it doesn't work properly on nested properties:

When I autoindent my code I get this:

#header{
  margin: 0;
  div{
    display: inline;
    a{
      text-decoration: none;
}
}
span{
  color: #ffffff;
}
}

instead of :

#header{
  margin: 0;
  div{
    display: inline;
    a{
      text-decoration: none;
    }
  }
  span{
    color: #ffffff;
  }
}

Here is my ~/.vimrc :

set nocompatible

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif

"Highlight Tabs and Spaces
set expandtab
set smarttab
set nocompatible
set hlsearch

" autoindent
filetype on
filetype plugin on
filetype indent on

" Show line number
:set number

syntax enable
set shiftwidth=2
set expandtab
set softtabstop=2

" https://github.com/tpope/vim-pathogen
execute pathogen#infect()

The only vim bundle that I'm using is the vim-less bundle.

Set custom shiftwidth etc.

Hi,

where's the correct place to override settings such as shiftwidth, tabstop and noexpandtab according to my customs?

Thanks!

Bohdan

Nested a:hover

.rule {
    a:hover {
        color:#fff;
    }
}

have different hightlighting then:

.rule {
    a:hover
    {
        color:#fff;
    }
}

Lots of vim errors when using the plugin

I've got the plugin loaded via pathogen and the syntax highlight looks fine. When I open a less file I get this:

Error detected while processing /mnt/ebs/home/dbeardsley/.vim/bundle/vim-less/syntax/less.vim:                                                                                                                                                                                                                                                                                     
line   12:                                                                                                                                                                                                                                                                                                                                                                         
E409: Unknown group name: cssValue.*,cssColor,cssTagName,cssPseudoClass,cssUrl,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,lessDefinition,lessComment,lessClassChar,lessVariable,lessMixinChar,lessAmpersandChar,lessFunction,@cssColors fold                                                                                                        
E475: Invalid argument: lessDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssTagName,cssPseudoClass,cssUrl,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,lessDefinition,lessComment,lessClassChar,lessVariable,lessMixinChar,lessAmpersandChar,lessFunction,@cssColors fold
line   17:                                                                                                                                                                                                                                                                                                                                                                         
E409: Unknown group name: cssValue.*,@cssColors "me=e-1 means that the last char of the pattern is not highlighted                                                                                                                                                                                                                                                                 
E475: Invalid argument: lessVariableValue ".*;"me=e-1 contained contains=lessVariable,lessOperator,lessDefault,cssValue.*,@cssColors "me=e-1 means that the last char of the pattern is not highlighted                                                                                                                                                                            

Note: I'm using VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 24 2012 11:16:47)

Slow file load time when opening files

Whenever I install this plugin (using pathogen, just adding as a submodule), opening any file becomes super slow (5 seconds).

Is there any way I could debug this and see whats going on?

I'm on OSX 10.9.1 / using VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 26 2013 09:51:25)

EDIT: The problem disappears when I set syntax: off in my .vimrc but of course that's not really a solution.

Having multiple rules on one line breaks highlighting

If I have multiple Less or CSS rules on the same line, it breaks highlighting. For instance:

#container {
    background: #000; color: #fff;
}

Will cause background to be highlighted correctly, as well as #000 but everything else on the line appears in blue.

Nested ID selectors

IDs nested within other selectors aren't highlighted. For instance

ul {
    #special-item {
        color: red;
    }
}

errors when saving c file

This happen only when I'm editing c source files.

Error detected while processing function 28_UpdateErrors..28_CacheErrors..SyntaxCheckers_c_GetLocList:
line 16:
E117: Unknown function: syntastic#c#GetIncludeDirs
E15: Invalid expression: ' '.shellescape(expand('%')). ' '.syntastic#c#GetIncludeDirs('c')
line 55:
E117: Unknown function: syntastic#c#ReadConfig

Vim74 syntax issues

I believe Vim74 introduced some new syntax definitions, which is causing properties like "padding", "left", and "border" to be interpreted as cssUIAttr and not cssBoxProp. In my color scheme "padding-left" shows up green, but "padding" shows up purple. I'm not sure exactly how to fix it.

License

Could you please specify a free software license for vim-less? For instance you could use GPL, MIT, BSD, Apache or what ever you like, but please specify a license.

Vim get slow over time

After minutes typing less files, vim get super slow. Up/Down movement take too much time. (1 second to move cursor 1 line up/down)

I have to :set syntax= and then again :set syntax=less to reset and all get normal again.

Any ideias what it could be? I'm having problem to track what is the cause.

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 12 2016 13:38:39)
MacOS X (unix) version
Compiled by [email protected]
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_old_static
+arabic +find_in_path -mouse_sysmouse -tag_any_white
+autocmd +float +mouse_urxvt -tcl
-balloon_eval +folding +mouse_xterm +termguicolors
-browse -footer +multi_byte +terminfo
++builtin_terms +fork() +multi_lang +termresponse
+byte_offset -gettext -mzscheme +textobjects
+channel -hangul_input +netbeans_intg +timers
+cindent +iconv +num64 +title
-clientserver +insert_expand +packages -toolbar
+clipboard +job +path_extra +user_commands
+cmdline_compl +jumplist -perl +vertsplit
+cmdline_hist +keymap +persistent_undo +virtualedit
+cmdline_info +lambda +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak -python +vreplace
-cscope +lispindent -python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con -lua +rightleft +writebackup
+diff +menu -ruby -X11
+digraphs +mksession +scrollbind -xfontset
-dnd +modify_fname +signs -xim
-ebcdic +mouse +smartindent -xpm
+emacs_tags -mouseshape +startuptime -xsmp
+eval +mouse_dec +statusline -xterm_clipboard
+ex_extra -mouse_gpm -sun_workshop -xterm_save
+extra_search -mouse_jsbterm +syntax
+farsi +mouse_netterm +tag_binary
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -o vim -lm -lncurses -liconv -framework Cocoa

hyphen changes tail coloring?

Might be just me but...

font-weight
font-size

the colors are of the tail of -hypen is off...

hyphen colors off

Is this suppose to happen?

Thanks. :)

problem with syntatic ?

I have installed syntastic plugin.
When I install vim-less and open *.less file I get

"lib/bootstrap.less" 26L, 602C
Error detected while processing function <SNR>28_UpdateErrors..<SNR>28_CacheErrors..SyntaxCheckers_less_
GetLocList:
line    3:
E720: Missing colon in Dictionary: {'bufnr': bufnr(""), 'text': "Syntax error"} })
E116: Invalid arguments for function SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'de
faults' {'bufnr': bufnr(""), 'text': "Syntax error"} })
E15: Invalid expression: SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults' {'bu
fnr': bufnr(""), 'text': "Syntax error"} })
Error detected while processing function <SNR>28_UpdateErrors..<SNR>28_CacheErrors:
line    6:
E712: Argument of extend() must be a List or Dictionary
E706: Variable type mismatch for: b:syntastic_loclist

Closing braces on nested rules are not auto-formatted properly

If I re-indent a file containing nested rules such as the one below (using a command like gg=G), the closing brace of the innermost nested rule is not properly indented.

Input

ul.article {
    width: 500px;
    ul {
        margin-left: 0;
        li {
            list-style-type: round;
        }
    }
}

Output


ul.article {
    width: 500px;
    ul {
        margin-left: 0;
        li {
            list-style-type: round;
    }
}
}

LOOKING FOR HELP

Hi,

I made this plugin doing some copy / paste when I tried out VIM a while ago.

I no longer use VIM or LESS and I have very little experience doing VIM script.
Unfortunately, I am not qualified to fix the current problems with this plugin.

I hope someone more skilled can help or take over the repo.

Please contact me if you can help !


Gunther Groenewege
info (at) g-design.net
http://www.g-design.net

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.