After save (ctrl+s) Javascript file change all format - javascript

I am having a problem with intellij IDE community edition 14.03 version that i hope you can help me,
when i modify a javascript file (an small change like a space) looks like intellij is changing the format or something behind scenes because when i check with svn tortoise in show differences as unified diff option looks like i was changing all my file, removing all the lines and the adding them again with the new change(the space that i added).
note: i was modifying the same file with webstorm IDE and when i select the same option(show differences as unified diff), this is just modifying the line that i change. i dont know if is something in my setting or a bug.

after checking this problenm with intellij team, in the bug
https://youtrack.jetbrains.com/issue/WEB-15304
We realize that the problem was due to .editorconfig file, we can work with .editconfig file to standarize the format of our files, doesn't matter what IDE are you working on, but in my case this file was getting my a headache, in my case the only thing that i need to do to solve my problem was remove does files in my project and everything is working fine now.
but i just wanna to mention that this file could solve a lot of our problems if our team work with differents IDEs
I am leaving the link about this if you are interested on it.
http://editorconfig.org/

Related

Visual Studio 2017 overwrote a file when I changed the filename, is there a way to revert that change?

I'm working on a project in visual studio, and I was switching between two instances of a file so I could showcase the differences between them. In order to switch between the files, I was being lazy and changing the filenames in file explorer outside of the IDE. It worked for a while, but unfortunately, this caused visual studio to overwrite one of the files with the other. I already checked the backup files, but my original file isn't there. Is there a way to undo this?
Thanks in advance.
EDIT
Ah, in case it isn't clear, the backup files I'm referring to are those located at MyDocuments\Visual Studio X\Backup Files\Project Name
There's no way to revert what happened. In order to minimize the danger of losing your work because of that I suggest to check out LocalHistory and use some form of source control for long term development history. Also, VS Code has a very nice option for comparing files that's definitely a must if you do that kind of things often.

Why does Netbeans navigator pane not populate javascript files with specific filenames?

While I admit this is a pretty obscure problem, I'm posting this partly in case it is driving others crazy (too), partly because it might have wider ramifications, and partly because it may be an issue with my project settings.
In NB-8.1 I have several angular modules for handling a configuration-editing app. Since last week I have been trying to figure out why the navigator pane doesn't populate with these files. When I click on the source, the Navigator pane doesn't update. If the pane is newly opened, it shows <No view available>. If it is correctly showing another file, it remains showing the old file and effectively ignores the new file.
After experimenting, I found that it is specific to any js file with a filename prefix of "config" - which in this case was all the files for this particular app (config-service.js, config-ctrl.js, etc). Renaming the files with a new prefix (eg, "konfig-ctrl.js" or "x-config-ctrl.js") solved the issue.
Is this widespread, or a problem only with this project? If the latter, what should I look for? Help or advice appreciated.
This looks like a bug to me. AFAIK NetBeans is handling JS files with the config in name as possible Karma configurations and maybe it (although I can't remember if Karma has to be enabled or where exactly does it look for these candidate files...) I'd suggest to report a bug against NetBeans https://netbeans.org/bugzilla/enter_bug.cgi?product=web (component HTML Project)
I get a very similiar problem. Any js file with "conf" in the name (anywhere in the name) cannot be Run as javascript from Netbeans. Right-click on the file and Run is deactivated. Once I change the name to something else, it works.

Indenting Javascript file line by line?

Is there any way in visual studio 2010 to indent javascript file line by line? I have got a big javascript file where all code is just on one line, so readability of the code is too much compromised.
Any hint? Thanks
One solution is to copy the entire file content in this site : http://jsbeautifier.org/ then press the Beatify JavaScript or HTML button, and you will get the js properly formated.
Now I suppose that Visual Studio could have a service identical to the sugested one, but I have not used it at all.
The PhpStorm that I am in love with it, has this option, to beautify the code if the code is compressed, as well allows me to define the look of the code format.
Also, as already described by #Andreas, you can use the plugin : http://visualstudiogallery.msdn.microsoft.com/41a0cc2f-eefd-4342-9fa9-3626855ca22a

Is there any Mac text editor with tail or watch files change feature?

Ideally I wanted to use this in TextMate but I didn't find any feature besides the Show Web Preview which is nice for the fact I can set the interval to update the page, but definitely doesn't work for watching any file and also apply syntax highlighting or any format.
One neat example of what I wanted to achieve is to simulate exactly the same behavior as CoffeScript Try Now feature where you can type in one side and see what the file would look like in javascript.
So ideally I would open my .coffee file and then run coffee --watch on terminal which will track any file change for that specific file, so I could just pop another window inside my text editor which will just keep updating the coffeescript .js generated file.
like this, where the window on the left shows the current file and the window on the right shows the file being watched with specific interval.
I am not sure if I was clear enought, if not, please just let me know..
but basically I just want to see in real time what happens to my files after run a specific script but with syntax highlighting and anything else possible.
I am just testing this kaleidoscope app, it is really nice the way the visualization works, no editing is possible neither syntax highlighting features though but it is really good, so it makes me think that something like this would be really nice:
cheers
Emacs can do both of these things (and you're probably better off running it as a Cocoa app).
ediff works similarly to Kaleidoscope (minus the diagonal lines connecting the two revisions) and does let you edit the files without disturbing the diff process. By default you get the versions above one another but you can press | to toggle to side-by-side and m to expand to the full screen width (unfortunately this doesn't work properly with multiple monitors, at least in the version of Emacs I'm using.)
To tail/auto-revert things, there's auto-revert-mode and auto-revert-tail-mode built into Emacs.
emacswiki.org is pretty good if you're trying to figure out how to do something in Emacs, as is (duh) Stack Overflow. Mastering Emacs is a relatively new blog which has some great articles. There's also M-x all-things-emacs which links to some useful screencasts.
You can open the log file in OSX's Console log viewer utility that is used to monitor system logs. Simple as that. It will not show you diff's but it does emulate the tail -f functionality.

ASCIIMath and TiddlyWiki

I use TiddlyWiki for work-notes. I already have pretty large wiki, but now I want to add math-support. As far as I understand what is written here, all I would have to do to use ASCIIMathML in my wiki would be including the script ASCIIMathML.js. Doesn't work (no effect at all). Then I found this plugin for TiddlyWiki, but when I import it to my wiki, it gives me an error in one of the regexp strings. When I download that wiki directly, ASCIIMath does not work anymore, even though I have the script in the same directory.
Does anyone have a solution available, how I can add ASCIIMath to my existing TiddlyWiki?
Edit: I know this not strictly a programming question, but questions about tools (such as SVN or VisualStudio) get asked here all the time, and I see no-one complaining there.
Ok, I've got it now. The plugin I linked in the question works, but one has to import by creating the tiddler manually and then copy/paste the script, otherwise what comes in is messed up. Then, one has to import the ASCIIMathML.js in the header-section of the wiki-file.
ASciencePad sounds like exactly what you need: TiddlyWiki + WISYWIG + AsciiMathML + AsciiSVG.
I'm not sure how to translate your existing wiki to it, but I guess you could cut-and-paste the wiki source?
You ought to be able to migrate all the tiddlers from one TiddlyWiki variant to another easily. At the worst you could just copy the block of tiddlers at the bottom of the html file in a text editor and paste them into the new file. (Since the "wiki source" is that html file, I'm not saying anything different than Beni Cherniavsky-Paskin did.)
Roger_S

Categories

Resources