Text editors, IDEs: Difference between revisions

From Helpful
Jump to navigation Jump to search
m (Helpful moved page Text editors to Text editors, IDEs)
mNo edit summary
Line 1: Line 1:
{{old}}
{{old}}
{{stub}}
{{stub}}
=Text editors=


Markers:
Markers:
Line 66: Line 69:
programmer tools
programmer tools
indent, astyle
indent, astyle
=IDEs=
===Visual Studio Code===
vscode is an editor {{comment|('Visual Studio' seems to be mentioned only for branding reasons, it shares little with VS)}} that runs in win+lin+osx (because it is itself a browser+javascript based thing).
More interestingly, it happens to take extensions to do a ''lot'' of things,
so with enough added installation it can be a full-blown IDE, supporting more languages that targeted IDEs.
(That said, if you're developing for windows, you may be better of with Visual Studio, community edition)
It lets you work remotely, over SSH[https://code.visualstudio.com/docs/remote/faq].
<!--
This has its flaws - it seems distinct logins do not always pick up on what extensions have been installed before (by others?),
so will  which isn't great for a reproducable execution environment.
-->
====vscode keyboard shortcuts====
* {{key|F1}}  - command palette (including things that extensions provide)
* {{key|F12}} - go to definition
:: {{keyhold|Ctrl}}{{key|K}} {{key|F12}} - show definition to the side
* {{keyhold|Ctrl}}{{key|K}} {{key|Z}} - Zen mode (uncluttered), {{key|Esc}}{{key|Esc}} to quit)
* {{keyhold|Ctrl}}{{keyhold|Shift}}{{key|Space}} - show function parameter help
'''Overview'''
* {{keyhold|Ctrl}}{{keyhold|Shift}}{{key|[}}, {{keyhold|Ctrl}}{{keyhold|Shift}}{{key|]}} - fold/expand code block
* {{key|F8}} - go to next problem
'''Formatting, refactoring and such'''
* {{keyhold|Alt}}{{key|Up}}, {{keyhold|Alt}}{{key|Down}} - move line
* Without a selection, {{keyhold|Ctrl}}{{key|X}}, {{keyhold|Ctrl}}{{key|C}} work on the line you're on.
* {{keyhold|Ctrl}}{{key|[}}, {{keyhold|Ctrl}}{{key|]}} - indentation
* {{keyhold|Ctrl}}{{key|/}} - toggle comments
* {{keyhold|Ctrl}}{{key|H}}
:: {{key|Ctrl}}{{key|Shift}}{{key|H}} - replace in many files (which exactly, though?  All in workspace?)
* {{key|F2}} - rename symbol (more language-aware replace)
'''Multi-cursor'''
: {{keyhold|Ctrl}}{{keyhold|Alt}}{{key|Up}} / {{keyhold|Ctrl}}{{keyhold|Alt}}{{key|Down}} - put cursor in same position on previous/next line
: {{keyhold|Alt}}Click - add via mouse
: {{keyhold|Ctrl}}{{key|D}} selects next occurrence of the word you're currently on (by substring, not symbol?)
: {{keyhold|Ctrl}}{{key|F2}} selects all occurrences (by substring, not symbol)
====Issues====
<!--
=====:failed to save ''filename'': unexpected type"=====
-->
=====lots of memory / CPU use=====
<!--
So, I like the ability to work over SSH.
I am less fond of the fact that vscode processes tend to consume gigabytes of memory and make my server [[trash]] unpredictably.
In my case it wasn't vscode but an extension, pylance, which seems to looks at absolutely everything,
combined with the fact I have one big directory/repository with all my projects, as well as a whole bunch of supporting data in subdirectories.
You can add ignores to pylance in the settings.
-->
=====cannot activate the X extension because it depends on the Y extension=====
Seems moderately likely to be some incompatibility between local and remote versions.
uninstall python, pylance, and jupyter (whichever of them you have) and installing them again is one good way to update them and tends to solve a lot of cases.
<!--
pylance is a somethat specific case, in that it became part of the python extension at some point.
-->
If each vscode client gets confused about what's on a single server state,
and each needs to alter both sides' state to fix it,
that may be the cause of the problem in the first place, so... good luck playing whack-a-mole.
Why would reloading the window help?
Iono.
=====pylance doesn't function=====
It does that. Try to install a different version and see if that helps.
<!--
=====pylance takes all my CPU=====
It does that, seemingly when VS code tells it to look at lots and lots of code.
-->
=====pylance talks nonsense, seems to be talking about completely different code=====
Yeahhhh... I dunno yet.
One issue I suspect is related is that pylance extension doesn't seem to prioritize
reporting on the code actually open above reading (large) data files in the same directory - it would get behind.
===Visual Studio===
<!--
(These days) Comes in Community, Professional, Enterprise editions.
Community is free, and covers all the functional basics.
: some fancier features are stripped out, particularly debugging. You will have to pay for those.
Until 2017 there was also Express, which where somewhat more featured variants of the, replaced by Community, which ''mostly'' seem to differ in that Community has more restricted licensing{{verify}}.
Professional is like Community in features, and like Enterprise in licensing{{verify}} [https://visualstudio.microsoft.com/vs/compare/]
Enterprise is everything.
tl;dr: if you focus on the MS ecosystem, it's a great tool, and professional programmers may well want to pay for the convenience.
If you focus on a larger mix of languages, you may not care.
https://stackoverflow.com/questions/30527522/what-are-the-differences-between-visual-studio-code-and-visual-studio
https://docs.microsoft.com/en-us/archive/blogs/wael-kdouh/should-i-use-visual-studio-2017-or-vs-code-for-my-next-angular-application
-->


[[Category:Programming]]
[[Category:Programming]]

Revision as of 15:35, 16 October 2023

⌛ This hasn't been updated for a while, so could be outdated (particularly if it's about something that evolves constantly, such as software or research).
This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


Text editors

Markers:

  • (+ssh) can load and save over ssh mostly transparently (Note also that applications like WinSCP also allow a decent solution for remote editing through watching local changes on files you have opened.)
  • (-syntax) does not have syntax highlighting (most do, though language supports always varies)

Pretty much all of the below do syntax highlighting.


Windows

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.
  • notepad (-syntax)
  • Notepad2 (third party; simple like notepad, but with syntax highlighting and a few other handy things)
  • notepad++
  • ultraedit (+ssh)

Linux

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


  • kate (+ssh)
  • kwrite (+ssh)
  • kdevelop (+ssh)
  • NVU (web-specific)


Unsorted

programmer tools indent, astyle


IDEs

Visual Studio Code

vscode is an editor ('Visual Studio' seems to be mentioned only for branding reasons, it shares little with VS) that runs in win+lin+osx (because it is itself a browser+javascript based thing).

More interestingly, it happens to take extensions to do a lot of things, so with enough added installation it can be a full-blown IDE, supporting more languages that targeted IDEs. (That said, if you're developing for windows, you may be better of with Visual Studio, community edition)


It lets you work remotely, over SSH[1].


vscode keyboard shortcuts

  • F1 - command palette (including things that extensions provide)
  • F12 - go to definition
CtrlK F12 - show definition to the side


  • CtrlK Z - Zen mode (uncluttered), EscEsc to quit)


  • CtrlShiftSpace - show function parameter help


Overview

  • CtrlShift[, CtrlShift] - fold/expand code block
  • F8 - go to next problem


Formatting, refactoring and such

  • AltUp, AltDown - move line
  • Without a selection, CtrlX, CtrlC work on the line you're on.
  • Ctrl[, Ctrl] - indentation
  • Ctrl/ - toggle comments


  • CtrlH
CtrlShiftH - replace in many files (which exactly, though? All in workspace?)
  • F2 - rename symbol (more language-aware replace)


Multi-cursor

CtrlAltUp / CtrlAltDown - put cursor in same position on previous/next line
AltClick - add via mouse
CtrlD selects next occurrence of the word you're currently on (by substring, not symbol?)
CtrlF2 selects all occurrences (by substring, not symbol)

Issues

lots of memory / CPU use
cannot activate the X extension because it depends on the Y extension

Seems moderately likely to be some incompatibility between local and remote versions.

uninstall python, pylance, and jupyter (whichever of them you have) and installing them again is one good way to update them and tends to solve a lot of cases.



If each vscode client gets confused about what's on a single server state, and each needs to alter both sides' state to fix it, that may be the cause of the problem in the first place, so... good luck playing whack-a-mole.


Why would reloading the window help?

Iono.



pylance doesn't function

It does that. Try to install a different version and see if that helps.


pylance talks nonsense, seems to be talking about completely different code

Yeahhhh... I dunno yet.


One issue I suspect is related is that pylance extension doesn't seem to prioritize reporting on the code actually open above reading (large) data files in the same directory - it would get behind.



Visual Studio