Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indentation issue #48

Open
acidjazz opened this issue Jul 9, 2016 · 10 comments
Open

indentation issue #48

acidjazz opened this issue Jul 9, 2016 · 10 comments

Comments

@acidjazz
Copy link

acidjazz commented Jul 9, 2016

I don't know if this is intended but it drives me nuts, any way I can disable or alter this?

indent

I believe its in GetStylusIndent() ?

@alephyud
Copy link

Had the same issue, got rid of it by commenting out the setlocal indentkeys line in indent.vim.

@acidjazz
Copy link
Author

@alephyud where is your indent.vim located? and can i see its contents and/or what your setlocal indentkeys line looks like now?

right now mine are o,O,*<Return>,},],0),!%R

@acidjazz
Copy link
Author

@alephyud still running into this and its driving me nuts, where did you say your indent.vim was?

@arusahni
Copy link

@d4vv
Copy link

d4vv commented Jan 10, 2018

any luck with that? I have the same issue... but dunno how to fix that...
image

@tudelhu
Copy link

tudelhu commented Aug 2, 2018

If you don't want to change the plugin files, you can also reset your indent keys in ~/.vimrc. This fixed the issue for me:
au BufRead,BufNewFile *.styl setlocal indentkeys=0{,0},:,0#,!^F,o,O,e
Make sure to add that after your plugins are loaded.

@acidjazz
Copy link
Author

acidjazz commented Aug 2, 2018

thanks @tudelhu ill try this out, and no @d4vv !!

@d4vv
Copy link

d4vv commented Aug 2, 2018

I will try this, thx ;)

@acidjazz
Copy link
Author

acidjazz commented Aug 2, 2018

@tudelhu no luck, i still get bad and awkward indentions

@tudelhu
Copy link

tudelhu commented Aug 7, 2018

Check the output of :setlocal indentkeys?. If it still shows the old setup (o,O,*<Return>,0),!^F), the fix did not work. Try manually setting the new values (:setlocal indentkeys=0{,0},:,0#,!^F,o,O,e). If that still does not work, you can try disabling styuls' indent function (:setlocal indentexpr=). You'll obviously lose most indentation features but IMO thats sill better than the default behavior.
If manually setting the keys works, the command from your .vimrc is not executed. Make sure your files are called *.styl or change the pattern in your .vimrc. Also make sure the command is executed after your stylus plugin loads.
If that still does not work, you can edit stylus' files and get rid of the new indentkeys. The relevant file is vim-stylus/indent/stylus.vim and you should find it in ~/.vim/bundle, ~/.vim/plugged or something similar (depending on your plugin manager).
Hope that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants