Wrong indentation with nested properties
antoinemenini opened this issue · 2 comments
antoinemenini commented
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.
bayleedev commented
This indents correctly for me.
groenewege commented
Hi everyone,
I wrote this plugin a time ago when I was trying out Vim and didn't find a plugin for LESS syntax.
I no longer use VIM or LESS and I am no vim script master.
I tried fixing this problem by looking at the haml / sass plugin.
Please let me know if everything is ok now.
best regards,
gunther