At the moment I'm testing PhpStorm IDE. It is really great, except one feature. It doesn't remove empty lines from end of file. It's now remove unneeded whitespaces, but empty lines at the end aren't removed.
It's really annoying for me. Can I change this behaviour?
Not currently possible. Please vote for IDEA-119281
Related
Problem Description:
I change something in my code, but PhpStorm removes all the unnecessary whitespaces at the end from several lines, where i havent worked on.
What i tried:
In Preferences > Editor > General, i deactivated the Option "Remove trailing spaces on:…" in the "On Save" Section
Result: not worked. PhpStorm still removes unnecessary whitespaces
Does someone know, how to fix that?
How can I fix this bug? It only happens when I edit html so it's not the keyboard
As Tobias Krogh said in his reply, you most likely have the Autoclose-HTML package installed.
Go into it's settings and disable the keybindings for it.
That fixed the issue on my end, so hopefully it will for you as well.
its appear cuz of AutoClose-HTML Atom make double signs in tags like this < so you have to erase one of them "<" and it worked for me.
I've tried various fixes with this, and it is really annoying me now.
Whenever I open a file as html, the default syntax for the file changes to HTML (RAILS). I can flip it back to HTML by the little select list in the corner, but it reverts. I've tried changing syntax specific files, setting extensions, etc. I even grepped HTML (RAILS) in my Sublime root folder recursively, and found nothing.
The thing that makes it hard to pin down, is that there is no extension difference. No matter which syntax highlighting I choose, the tag is the same.
I don't need syntax highlighting or autocomplete for HTML, but I do really like how matching tags are underlined in HTML syntax highlighting, and without it, I often miss unmatched tags, and cause lots of extra work for myself.
Any guesses on what this is / how to restore HTML to proper clean HTML highlighting?
(Note: The behaviour is identical for HTML and HTML5 and as I discussed in this post, I can't get tag matching to work in HTML5 anyway. That problem preceeded this one, but using HTML instead of HTML5 was an acceptable fix - that no longer works.)
In case anyone else has this bizarre issue, I've solved it.
There is a package installed (dont' remember if it was installed from the beginning, or if I added it) called Syntax Matcher. I commented out the following lines in a file called SyntaxHighlighter.py:
if self.ext == '.html':
self.set_syntax('HTML (Rails)', 'Rails')
return True
And the problem was solved instantly.
I installed the All Autocomplete package in my Sublime Text 2 editor and everything works fine except when I type "<div" or something similar, the auto-complete box pops up, I select the one I want and hit enter and it adds "<<div></div>" with an extra "<" in the front of my tag. I have to go back and delete the extra "<" every time...(!)
I can't seem to resolve this issue. If I use the command CTRL+Space, the box pops up and I can select the tag I want and it does not include the extra tag but that messes with my flow.
Has anyone out there experienced this? Thanks for your help!
I've just installed the package and it seems to work fine for me.
I type <div and then hit Tab or Enter and it completes correctly.
The only thing I can think of is that the AllAutocomplete package is conflicting with another package/plugin you may have installed.
It seems to be a problem with Zen Coding. See here.
Unfortunately I tried all suggestions there, including peruvianidol's 'Packages/HTML/html_completions.py' solution, but haven't had any luck.
I have a python script with 3-spaces before each line as indent. Now I want to make further editing easier and added "set tabwidth=3" in my $HOME/.vimrc file. It works when editing under MacVim, however, when later running it, python complained about the inconsistent indent between the original '3-spaces' indents and my new '1-tab' indent. Not sure why and how to work it out.
Use
set ts=3
set expandtab
this should work for you.