Auto update changed paths like Dreamweaver, Possible in Sublime Text? - plugins

I recently started using Sublime Text 3, mostly for HTML and CSS and still learning the tricks.
In Dreamweaver, if I change a linked file/folder name or move it to different folder (within the project folder), it asks if all the html file containing those links should be updated and if confirmed it does updated the all the files in the project folder automatically, even the unopened files are updated! It saves a lot of time and errors.
This is the only feature I missed in Notepad++ when I used it for few projects.
Now, I am wondering if the above feature is there in Sublime Text (by default or with the help of some plug ins)?
I will greatly appreciate any helpful suggestion.

This feature is not present in Sublime by default, nor in any plugins of which I am aware, and although it is theoretically possible to write such a plugin it would be quite computationally intensive to have the feature "live". I find it much easier to keep CSS, JS, and markup in defined directories, and not move them around after creating them :)
You have to keep in mind that Notepad++ and Sublime Text are text editors, not IDEs, and so don't have all of the features of giant programs like Dreamweaver that are hundreds of times their size. Their primary purpose is editing and otherwise manipulating text, and ST at least (I'm not terribly familiar with N++) has a nice plugin API for writing functions to assist with that (such as inserting the path to a file), and people have even been able to write much more complex plugins to do things like linting and code intelligence, but things like keeping an eye on large groups of files and changing them all in response to certain events, or completely refactoring significant amounts of code, just isn't what it's designed for.

Related

vscode: Speed up navigation througe huge projects - intellisense etc

Objective
I've a huge vscode Project:
2 Mio Files
100+ GB.
a lot of C-Files, but also build folders a lots of other irrelevant crap.
vscode is slow.
The project includes besides a lot of C/C++ files maybe in some parts cmake files, some codegen/glue-code, external headers, build scripts, external includes from SDK.
I want to use vscode to edit the code, not to compile or run it. The project consists besides the relevant c-files out of a lot of precompiled libs, helper tools, a huge amount of other files and images.
I want to speed my vscode setup up.
How to tell the user supporting tools of vscode, where to set their focus?
Are there any other options to speed up vscode?
Approach
My First Idea: "Make vscode ignore of everything I do not need and tell the tools precisely on what to focus and which leave aside."
Is there a way to make vscode ignore all of such folders in search and in the c++ indexer, the tool which supports code navigation and syntax highlighting?
Clarification / Additional info
I do not have configured vscode. I do not know how. Most the time intellisens/code heighlighting / autocompletion etc. works fine and I can jump around in that code. How ever I've encountered some huge projects, where intellisens failed half or in total or took a lot of time to do so. I do want to set up an project properly. I do not know where to find such settings and most important, which behavior it affects:
intellisense, please have a look only at folders ...
actially, ignore everything below those folders
take this single subfolder, but ignore everything around it.
btw, there is an totally different location for SDK headers, could you also use code and header from there?
I do use vscode to edit the code, I do not use it to compile or debug the code.
In short, I do not know which support tool (intellisense, c++ Extension, ???, ...) have which effect and where they can be configured. Like which vscode components make my life as easy as it is and how do I configure them?
EDIT: List of installed Plugins
as from #user requested :). If cmake is known for eating resources, I could discard it. Is it mandatory for the intellisens stuff?
Could discard python too, if necessary.
ms-vscode.cpptools
https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options
ms-vscode.cpptools-extension-pack
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-extension-pack
ms-vscode.cpptools-themes
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-themes
alefragnani.bookmarks
https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks
twxs.cmake
https://marketplace.visualstudio.com/items?itemName=twxs.cmake
ms-vscode.cmake-tools
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools
ms-python.python
https://marketplace.visualstudio.com/items?itemName=ms-python.python
ms-python.vscode-pylance
https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance

Is there a way to prevent MS docx document editing in OpenOffice?

I know this is too strange question, but we have multiple authors of one document and some contributors use OpenOffice to edit document, originating and edited by majority in MS word. Document is quite complex with differently structured paragraphs and fonts, bullets, numbering, embedded pictures, references to comments under the line, copied/pasted sections pasted with source formatting instead of pure text etc., so generally "fragile" and maybe little bit exceeding expectations of OpenOffice authors for MS compatibility. Bottom line is about various formatting issues, glue-ing of some words (occasionally space is missing), page footer/header modified or completely disappeared etc. We are unable to control behaviour of contributors and editors to the extent I would like to have, so I am trying to findout whether is there a way how to force users to use exclusively MS word for particular docx and to prevent using anything else? (I am not on MS payroll, I personally moved couple of people around me with "standard" document writing needs to OpenOffice, but incompatibility in this case creates useless redaction work for us.)
Thanks for any hint.
whether is there a way how to force users to use exclusively MS word for particular docx and to prevent using anything else
To me, it sounds like a terrible idea to try to enforce this with a macro or similar (and it probably wouldn't work even if you tried). Instead, come up with a better workflow and communicate with anyone who may be involved so they know what to do.
First question, is the document under configuration control? For example, if a bad change is made, do you have a way of going back to a previous version? There are many different configuration management tools available, both free and commercial.
Next, I would strongly recommend making final changes with only one Office suite. Pick either LibreOffice (or Apache OpenOffice - is that what you mean by OpenOffice? The OpenOffice.org suite was forked several years ago) or MS Word to be the official editing tool, but not both.
If you pick MS Word, then people can still make preliminary changes to the document using LibreOffice. However, someone with MS Word will then need to use a Diff tool to see the changes and then use MS Word to incorporate those changes into the document. Or ideally, Track Changes would be turned on to make it easier to see what changes were made and who made them. Comments can also be added to explain why changes were made.
What is even better is to get people to send marked-up PDF files that contain their proposed changes. PDF files cannot be edited, which is good because it avoids the kinds of problems that led you to write this question, and also the formatting changes they made will not appear differently on another computer. However, this requires a certain amount of education so that everyone agrees to do it this way, and in my experience, that's not easy with a diverse group.
If you ever see that someone has made changes to the main document using LibreOffice, you or someone else needs to go back to the latest version not edited by LibreOffice and then use MS Word to incorporate all of the new changes.
At this point, if both suites have been used to edit the document, then I would probably start off with a new blank document and copy all of the text unformatted into it. This would require redoing all tables and other formatting. Otherwise, it's likely to be nearly impossible to get a clean document, and the underlying formatting may have no end to the number of problems that keep popping up.

editor which performs well searching text through a huge codebase

I have a huge text codebase on Windows and I am facing the problem of searching arbitrary words across the whole project.
Seemingly, no IDE scores good performances when doing so. What I am looking for is a free editor that:
searches full text through the folder and subfolder in an acceptable time (ideally less than 10 seconds for 10M lines of code).
Almost surely, the previous feature entails in using an index. So I'd like such index to be automatically in sync with file changes. Or at least to have the option to rebuild it on demand incrementally (not a full rebuild)
shows the search results in context (with snippets of the surroundng code around, pretty much like Sublime does).
ideally, be able to search for regex patterns
...and even, to search for regex through multiline strings.
I do not need it to be code-aware, but if it were able to understand PL/SQL it would be my dream editor.
So far my first choice was Sublime, which is an incredibly responsive editor.
Sublime 3 shipped with an internal index, but unfortunately for me, indexes just the symbols, not the full text.
The built-in brute force search cannot use that index and takes around 40 mins to return the results.
I tried several Sublime extensions which plug into external indexing tools (CodeSearch, Platinum Searcher, Whoosh). But all failed to provide automated or incremental index rebuild, or when they did offer those features, the indexing itself took so much memory that the entire app became unresponsive forever, or the plugin host broke down.
I also tried similar approaches with Atom and Visual Studio Code, but I believe that the editors and their plugins weren't written for such an insanely large codebase as I have at hands.
The only editor that performed well was Eclipse with the InstaSearch plugin.
However the speed that I gain in the search is lost in ordinary usage: opening a file, scrolling through its content, etc (not to mention that the plugin uses Lucene's syntax, not regex).
(It feels like if one is not using Java related technologies, there is no real benefit in using Eclipse which really offsets the heaviness of operating with it)

Package development for Sublime Text 2 with multiple files without restarting

I am developing a couple of packages for sublime text, and to avoid copy and pasting massive amounts of code I began to move my classes into separate files. I have been avoiding this so far, since, in my current workflow, changes to files that are not in the main plugin file won't get updated when saved and only go into effect when I restart sublime.
Is there a way to reload a package, including all it's files, without restarting Sublime Text?
You don't actually have to restart the editor. You will have to restructure your plugins though to take advantage of this. Essentially, you can load the plugin files from some top level file. As an example, take a look at Package Control. I also do it in PersistentRegexHighlight (though the package control solution is likely more robust (I did base it on that). Still not as good as simply saving a particular file, but better than restarting! In fact, you could probably tie into the on_post_save event to automatically save the top level file when you modify a child file.
I personally found the easiest solution was to install Package Reloader, and just put a new file in the top directory of my plugin named .build. Save your top-level plugin file and enjoy not having to restart.
Virtually no restructuring of code required.
From the unofficial docs:
Sublime Text will reload top-level Python modules from packages as they change (perhaps because you are editing a .py file). By contrast, Python subpackages won’t be reloaded automatically, and this can lead to confusion while you’re developing plugins. Generally speaking, it’s best to restart Sublime Text after you’ve made changes to plugin files, so all changes can take effect.
Unfortunately, plugins are not loaded into a scope visible from the console (Ctrl`), so you can't just reload() it. EDIT But, you can call reload() from within your top-level plugin file, as detailed in #skuroda's answer.
You'll have to make the decisions on when to break classes out into separate files vs. keeping them together in one monolithic collection. Having 50 files, each with only two or three function definitions is overkill in one direction, while having 20 classes each with 10 or 15 methods all in one file is going overboard in the other, so just do what feels best for the particular project. In my experience killing/restarting ST2 doesn't take too long in any of the supported operating systems (except on XP, for some reason...), so hopefully it's not too much of a delay on your workflow. One suggestion I'd give is to create a portable installation (if you're on Windows) with just the bare essentials in extra plugins if your startup time is too long.
Good luck!

Is there a code editor that will allow copying of syntax highlighting to an Office Document for Windows?

Is there a code editor that will allow copying of syntax highlighting to an Office Document for Windows?
I want to be able to copy code into a Word doc or EMail and preserve the Formatting when explaing code changes.
I will need support for multiple languages including C, C++, TCL, Javascript, Basic, and couple others.
The ability to include the line numbers for reference purposes would be a nice additional feature. I had one customer that required all code to be submitted with line numbers in a Word or PDF document.
I used Notepad++ in the past. It has a plug-in called NppExport and I think it has everything you need. The catch is that you have to write/open your source files with Notepad++, then export them to rtf, open the rtf and copy the pretty-formatted text to your doc file.
Here is the link to Notepad++ and to a good article to get you started with NppExport plugin.
Visual Studio (2010 Professional) "works fine" for copying code and formatting/coloring to MS Word (2010) and Outlook (2010)*. It supports at least C/C++/C#, and JavaScript code. It might support TCL/BASIC (it does support VB/VB.NET), but I do not use those languages. And, of course, VS is a full-blown IDE.
Visual Studio 2010 Express is free (as in beer). But as my company pays for my copy, I can only hope the copy'n'paste support works in Express as well ;-) In any case, it might be worth a try.
I am not sure if line-numbers can be exported via copy'n'paste, but I sort of doubt it. It's not a use-case I've run into.
Personally, I'd recommend doing the review via a SCM/code-review process and not manually, which just sounds like a nightmare. There are additional advantages of using tooling designed for this purpose including history management and talking about what really is, or could be (in relation to what was), and not a copy of what might have been.
Happy coding.
*After pasting into Microsoft Word, disable the "Add space after every paragraph" option to remove what appears to be blank lines from the pasted code.
Eclipse will do fine if you install the language support for all the wanted languages.