How to disable syntax highlighting in Atom.io - atom-editor

Is there a way to disable syntax highlighting in Atom.io?
I have searched a bit and ended up creating my own syntax package (https://atom.io/themes/no-syntax-highlighting-syntax), but maybe there is a better way.
NB: I just want to disable syntax highlighting (ideally keeping only comments and code in a different color), but I still want the other language-related features of Atom.io working. Like language completions, language snippets, language closure/bloc detections, auto-indent, etc.
(Some people argues against syntax highlighting, stating it might be actually harmful to developer productivity. I wanted to try that. Ie. http://www.linusakesson.net/programming/syntaxhighlighting/ and https://www.robertmelton.com/2016/03/21/syntax-highlighting-off/)

You can use Ctrl+Shift+L (or press button bottom right) to select proper language. In your case it would be Plain Text.
Second option is install package https://atom.io/packages/file-types and add in config.cson:
'file-types':
'YOURS EXTENSION': 'text.plain'

Haven't found a better solution yet.
If you are trying to do the same thing as I was - disabling syntax highlighting in Atom.io while keeping comments differentiated, language completions, language snippets, language closure/bloc detections and auto-indent - I would just recommend to install the theme I've created: https://atom.io/themes/no-syntax-highlighting-syntax

Set the file syntax to plain text. You can do this with control alt L or something like that.

Related

Is it possible to change Drupal's coding standards or get around tiny spacing?

In order to submit a drupal module, you must adhere to Drupal's coding standards. The problem with the coding standards, is that it has one specific and very annoying standard: indenting. I absolutely hate that the indenting is:
Use an indent of 2 spaces, with no tabs.
If it was 4, then I could live with it. Is there any way to go about convincing Drupal to change these standards, or at the very least, is there a way others deal with this? Perhaps a Netbeans plugin that shows single spaces as double or something similar?
No one is going to change Drupal's coding standards.
You can write your code in your style but before submitting it, you can just "autoformat" all the code (Alt + Shift + F) with the Drupal coding standards which can be configured at: Tools -> Options -> Editor.

How do I stop Sublime Text converting Sass variables on pressing tab?

Does anyone know of a way to prevent Sublime Text 3 converting sass variables on pressing tab?
For example, I might type $variable-name and then press tab, intending to insert the : and space, which would be the normal CSS behaviour. Within doc type sass, I get 1variable-name:; instead.
It's rather annoying to have to correct every time, and I'm sure others get irritated with the same. I have the Sass and Emmet packages installed.
Many thanks. Your help is much appreciated.
Too long for a comment...
So I did a little digging last night, and from what I can tell this behavior is hard-coded into Sublime. The command that's executed when Tab is pressed right after a variable is expand_abbreviation_by_tab. Many times, Sublime commands are implemented in .py files, and can so be edited to suit your needs. Unfortunately, I was unable to find any mention of this command anywhere, leading me to believe that it's hard-coded. I suppose a workaround would be to enter a space before hitting Tab, if your end goal is to have the colons : aligned with each other. Another option would be to use the Alignment plugin, available through Package Control. It's very configurable, and I highly recommend it.

CSS Highlighting in Vim Breaks if I Open a Second Tab

I've been re-writing my resume from scratch (good way to start the new year, I think,) and I'm doing it as a webpage. Naturally I want all the HTML, CSS & Javascript in one file, so it'll be portable.
While working on it in Vim, I have the CSS, HTML, & Javascript sections of the document open in separate tabs. But as soon as I open a second tab, the syntax highlighting for the CSS turns off. The HTML and Javascript continue to be highlighted properly.
I'm not a Vim expert by any means, so I apologize if this is too basic a question, but I couldn't find any documentation (or existing posts on Stackoverflow) that address this issue.
Thanks in advance for any insight.
Because vim doesn't start looking for highlighting at the "top" of the file, but rather a few hundred lines up from the current on-screen view, you can sometimes get the highlighting to work by scrolling around a little.
If this works, you can tweak the syntax highlighting controls so that you don't have to waste your time scrolling around; for full details, see :help syn-sync. There's several options:
Forcing vim to start recognizing syntax from the very start of the file every time. This might lead to significant performance problems on huge files but that might also be an indication that your source could be better split apart.
:syntax sync fromstart
Increase the number of lines that are parsed. This reduces the chances of bad syntax recognition without necessarily incurring the expense of reparsing the entire file from the start each time.
:syntax sync minlines=200
Pick a number that is large enough to work almost all the time without significant performance penalties. This is probably the best approach to take, even 500 lines ought to be alright on most computers from the last decade.
If you're editing C-style code, vim can easily resynchronize using C-style comments. (Note, not the // newfangled variety but /* the original style */.) Probably not the best choice for HTML, CSS, JavaScript, but perhaps your code makes it more feasible:
:syntax sync ccomment
The fourth method uses "sync patterns", similar to the C-style comments, but more applicable to other environments. It has enough extra complications that I don't think describing it here is worth the effort -- :help syn-sync-fourth has all the details for the curious.
Any of these configuration options can be added to your ~/.vimrc file:
syntax sync fromstart
You can change the behavior based on what kind of files you're editing. Just leave off the leading : when adding lines to the file. Use autocmd to define it for types like this:
autocmd BufNewFile,BufRead *.html syntax sync fromstart
These may become relevant to provide an answer
what version of vim are you using? I'm assuming you're using Vim 7.3 (if not, you should - most linux distors have it, and there's an exe for Windows and MacVim for osx). It could be that your installation is old or broken.
Any plugins? A simple check will be to temporarily remove all your plugins, restart vim and see if this still happens.
Anything special in your .vimrc? If you customized it yourself then there are probably not too many surprises, but if you borrowed from someone else, you can do the same thing you did with the plugins folder (empty or bare-minimum file).
Hope this helps - good luck!

What are cons to write and manage CSS in notepad?

What are cons to write and manage CSS in notepad? in compare to any css IDE?
specially in team environment? How much it will effect to project timeline if we are forced to use notepad.
should we always use an IDE for CSS?
No Auto-intelligence
Need to remember each keyword and syntax
No Formatting and alignment
No Rapid Development
No Syntax Highlighter
No CSS Checker and Validator
No CSS Beautifier
No Code collapse functionality
I use Notepad++ for editing my CSS and one of the things it does better than Notepad is syntax highlighting and occassionally formatting and indentation.
Syntax highlighting isn't that important for CSS but at least having an editor with that does cut down on typo errors.
If it's only cons:
you're not able to automatically format your CSS code
you will need to do indentation yourself
prone to errors
nobody writes perfect codes, and without an IDE, chances is there will be errors here and there
No inline code hinting
you probably need to know what to type, for there are no hinting what values are able to be entered for that property.
no syntax highlighting
stop straining your eyes!
But for me, time is precious. I'll rather open CSS files and edit them in Notepad, rather than spending some time opening, saving code and closing an IDE just to edit few lines of CSS code.

ASP.NET Editable Text Box with Syntax Highlighting

Here's what I'm trying to do. I'm looking for a WYSIWYG editor or just a plain text-box that will highlight HTML syntax (in ASP.NET). Basically, we have a CMS that allows you to mess with templates for various pages, but right now all of the editable HTML is in a plain, ugly, text box. Does anyone know of an editor that will highlight the synax and allow you to edit it? I've checked out Antipro SyntaxEditor, which seems to be a good highlighting solution, but it's just a highlighter, and not an editor.
Thanks!
You may need to combine tools. For example, SO combines Markdown with Google Prettify which handles the actual syntax highlighting.
Another option is CKeditor and they offer open source licensing.
I use FreeTextBox on my dasBlog site. It seems to work pretty well and has the capabilities you're asking for.
Update
Hmm... the version on my own site has a button the toolbar to do syntax highlighting, but that button isn't shown on any the demos available at the link I have gave you. Just know that it does work, but that you may have to play with the configuration some to get that working.

Resources