this post was submitted on 17 Dec 2024
80 points (95.5% liked)

Linux

48649 readers
1076 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I'm getting back into coding and I'm going to start with python but I wanted to see what are some good IDEs to write the code. Thanks in advance.

top 50 comments
sorted by: hot top controversial new old
[–] leastprivilege@lemmy.ml 4 points 8 hours ago

Neovim! Here is a good video to get started TJ DeVries. If you just want to give it a shot there are a lot of preconfigured options like lunar vim or NVchad.

[–] tapdattl@lemmy.world 2 points 7 hours ago

I'm a big fan of vim/neovim with nerdtree and airline added in.

I've also been tryingourt Zed recently, it natively supports vim keybindings, so my workflow hasn't changed, but its lightning fast (programmed in rust) compared to vs-codium (an electron app)

[–] mvirts@lemmy.world 1 points 7 hours ago

It pains me to admit this but VSCodium has become my de facto standard

https://vscodium.com/

[–] Ziglin@lemmy.world 3 points 10 hours ago

I'm slowly learning Emacs, I'd say I like it but it's a lot of config work and I wouldn't recommend it to somebody who hasn't programmed before.

[–] 737@lemmy.blahaj.zone 8 points 16 hours ago

vim/nvim is really great

[–] utopiah@lemmy.ml 4 points 14 hours ago* (last edited 14 hours ago)

Because people ask for an IDE, rather than an editor, I will say :

Vim + terminal(s) + containerization (e.g. Docker CLI, Python venv) + live reloading (e.g. nodemon or inotify or in the browser using e.g. server side events) + repository management (e.g. git in CLI to juggle between branches, push/pull local/remotely)

IMHO this is very VERY light (0 wait even on a RPi Zero) and yet very flexible.

Also most of that can be "saved" via e.g screen the CLI tool, allowing to have named windows in a terminal and a lot more than to e.g. screen -raAD, locally or remotely.

[–] learnbyexample@programming.dev 4 points 19 hours ago

I use Vim ;)

Python itself provides IDLE, which is good enough for beginners. https://thonny.org/ is another good one for beginners.

As mentioned by others, Jetbrains is good for many languages. https://www.kdevelop.org/ is another option.

[–] eugenia@lemmy.ml 30 points 1 day ago* (last edited 1 day ago) (1 children)

My husband, who mostly codes in assembly these days (he's mostly retired so his hobby is old atari, amstrad, and spectrum computers), went from VSCode, to Sublime, to now Kate. He prefers to use 100% open source apps, without strings attached. VSCode is nice, but it has lots of weird stuff in it that aren't necessarily up to the spirit of open source. So Kate works perfectly for him, although VSCodium would do well as well (it's just that Kate has better syntax highlighters for his weird assembly). Also VSCode/ium is using about 250 MB of RAM, while Kate about 45 (and Sublime only about 32).

[–] SpiceDealer@lemmy.world 23 points 1 day ago

(he’s mostly retired so his hobby is old atari, amstrad, and spectrum computers)

Your husband is an absolute legend.

[–] veer66@social.vivaldi.net 3 points 1 day ago

@SpiceDealer I use Emacs as an IDE for Python.

[–] Kazumara@discuss.tchncs.de 14 points 1 day ago* (last edited 1 day ago) (2 children)

I really like Kate as an advanced editor with syntax highlighting, auto-completion, plugin support. I would then use the Terminal pane at the bottom to run my code during development.

However, if you want a full IDE with included dependency management, test runner, and debugger it's probably not enough.

One of my professors said you don't need an IDE, the Linux system already is a development environment. Not sure that I fully agree with that, especially thinking of things like Android Studio that include the virtual machine smartphone, but it's still an approach thing that is worth trying out.

[–] beyond@linkage.ds8.zone 2 points 13 hours ago (2 children)

One of my professors said you don’t need an IDE, the Linux system already is a development environment.

Considering "the Linux system" is literally anything you throw on top of the kernel called Linux, it can be a development environment or anything you want it to be. But I think part of the appeal of an IDE is how all the parts integrate (the "I" in "IDE") so a bunch of packages thrown together might not provide the same cohesive feeling.

[–] communism@lemmy.ml 2 points 8 hours ago

Considering “the Linux system” is literally anything you throw on top of the kernel called Linux, it can be a development environment or anything you want it to be.

I'd just like to interject for a moment...

[–] Kazumara@discuss.tchncs.de 2 points 13 hours ago

Considering “the Linux system” is literally anything you throw on top of the kernel called Linux, it can be a development environment or anything you want it to be.

Yeah I thought about the same thing when posting, if anything it would have to be the the combination of tools available on Linux. Like GNU binutils, GCC, GNU emacs, GDB, Git. But that's how I remember him saying it. Either my memory is wrong, or he just wasn't that precise in his language.

But I think part of the appeal of an IDE is how all the parts integrate (the “I” in “IDE”) so a bunch of packages thrown together might not provide the same cohesive feeling.

I agree, it may not be what you want if you're looking for an IDE.

But, like me back then, if you're new to the Linux ecosystem, it's good to hear at least once that you don't strictly need to look for an IDE. And that you can instead use disparate CLI tools together, to make for an experience that some people end up preferring.

[–] Telorand@reddthat.com 4 points 1 day ago (1 children)

Nobody needs an IDE. After all, you can just open a blank file and get straight to work. I could also just use Linux without a DE. Who needs all those graphics, amirite? I could also use a can with some string instead of a phone—or better yet, just shout really loud!

(/j)

[–] utopiah@lemmy.ml 1 points 9 hours ago

use Linux without a DE. [...] (/j)

... actually (tip fedora hat) not but seriously actually most of what we NEED is fine that way. It sounds ludicrous then you try Sxmo on a phone and you can't help but GENUINELY wonder "Damn... did I get scammed all those years?"

[–] hamburger@discuss.tchncs.de 26 points 1 day ago (1 children)
[–] nullstreamer@feddit.org 15 points 1 day ago (3 children)

I'd suggest going with LazyVIM / SpaceVIM as a starting point, though, as configuring vim from blank state is an art itself and requires quite some time and dedication.

[–] communism@lemmy.ml 1 points 8 hours ago

configuring vim from blank state is an art itself and requires quite some time and dedication.

Not really sure where you got this from. It's quite simple to me. The default vim config works completely fine for me if I'm eg in a VM and I don't want to copy all my vimrc and plugins over, if it's a machine I'll be using more long-term then it's quite quick to configure a few settings to be how I prefer them to be. Main changes I make to a default config is enabling line numbers (idk anyone who wouldn't want line numbers tbh) and setting them to be relative, set scrolloff=9999, use 4 spaces for indent, enable line and column highlighting, set a theme, and a couple odd scripts, but again the default is perfectly usable and the tweaks in my vimrc are just to my personal taste.

[–] 737@lemmy.blahaj.zone 6 points 16 hours ago (1 children)

starting off with nothing but vim/nvim really isn't bad

[–] Jakeroxs@sh.itjust.works 1 points 16 hours ago (2 children)

I still have no understanding of how to do literally anything in vim, I couldn't even close out lol.

[–] 737@lemmy.blahaj.zone 1 points 6 hours ago (1 children)

so you literally just never tried to learn it at all? what's the point of this comment?

[–] Jakeroxs@sh.itjust.works 1 points 6 hours ago* (last edited 6 hours ago)

I'm asking now in case it comes up again, I couldn't make any sense of the documentation for the hotkeys.

I was trying to edit config files, not learn vim at the time, I just needed a text editor so I could save my changes lol

[–] toynbee@lemmy.world 1 points 9 hours ago (1 children)
[–] Jakeroxs@sh.itjust.works 1 points 7 hours ago* (last edited 7 hours ago) (1 children)

Where would I even type that lol.

[–] toynbee@lemmy.world 2 points 7 hours ago* (last edited 6 hours ago) (2 children)

Apologies in advance for the WOT. I will not be offended if you don't read it, but I did try to include helpful information.

So, for reference, though this command should work it's not the correct way to exit vim (for several reasons). Also, if nano works for you, then there's nothing wrong with using it. IMHO you lose a lot of the power of vim, but some of the beauty of linux is that customization is big part of it. One of the smartest and most linux-knowledgeable people I know uses nano and can outperform me in basically every linuxy way.

Also, a caveat: I know some stuff, but I'm not an expert in anything, let alone neat stuff like this. The text below is accurate to the best of my knowledge, but may not represent the whole of the paradigm.

Now, to answer your question: vim is what's called modal. You have two primary modes: editing (amusing edit: this is also called "insert" mode) and command. Editing mode is what it sounds like: When you're editing a file. This mode is usually entered by pressing a button that starts the process of changing the file - stuff like i (for insert mode, which just starts adding text you type where your cursor is) or o (which starts adding text you type on the next line) or many others. This mode is exited by pressing Esc, which leaves you in command mode. In command mode, you can start with a :, which generally goes to a field (not the right word, but the one I'm using) at the bottom of the window/screen. This is the command. The command can be extremely complex and even chained. People who are more into vi(m) than I am call it a sentence, I believe, but I might be misinterpreting that. (You can also type things without a : but those will have different kind of impact.)

So, to run the command I posted above, you would start by pressing Esc to make sure you were in command mode (if you already are it will just maintain command mode). Then you would type : to start the command (or possibly sentence). Then you would type the !, which tells vim that this command is to be run in the shell, rather than as a vim command. Then you would type pkill vim which is a command that would tell the shell to identify a process called vim and kill it. This would exit vim but is, again, not the correct way to do so.

The usual way to exit vim correctly would be to press Esc to make sure you were in command mode, then type one of the following:

  • :wq (write and quit)
  • :q (quit without saving the file)
  • either of the above with a ! after it (e.g. :wq! or :q!) which tells it to ignore errors (:q will complain if you have made any unsaved changed but adding ! will ignore those complaints)
  • press ZZ (I've not used this myself, but I think it's equivalent to :wq)

One last aside: If you do decide to try to use vim, this is a useful resource: https://vimschool.netlify.app/introduction/vimtutor/

edit: Very small formatting changes.

edit 2: Just some random facts because vim is cool:

  • You can type :! with no other text to see the terminal from which you launched vim, then press enter to return to your active vim session, which can be useful if you're trying to replicate text in an environment where you can't copy and paste (and probably other circumstances)
  • Adding % before any command applies it to the whole file (rather than, for example, just one line) which can be useful if you're trying to sort a file (and in other circumstances):
%!sort

(without the % it would just try to sort the current line, which likely wouldn't be too useful since I believe it only goes by the first character of the line unless you present other arguments)

[–] 737@lemmy.blahaj.zone 2 points 6 hours ago (1 children)

to apply a shell command to a single line you need :.!command. :!command just runs it normally and outputs stdout to the terminal instead of inserting it into the buffer.

[–] toynbee@lemmy.world 2 points 6 hours ago

Ah, my mistake.

[–] Jakeroxs@sh.itjust.works 1 points 6 hours ago (1 children)

Very interesting, thank you!

That does help contextualize my experience a bit, I was very much not expecting a "mode" so I started trying to just type and things were happening lmao. Much appreciated, I might have to give it another try next time, I see there's a lot of love for the vi family in general, almost cult like ;) but a good sign that it is a really powerful tool once you understand it.

[–] toynbee@lemmy.world 2 points 5 hours ago

Thank you for being receptive.

As I said, I'm not expert, but I am a fan. If you decide to try it out and are looking for guidance, I (and, separately, probably several communities) would be happy to help as best we're able.

[–] o_d@lemmygrad.ml 1 points 1 day ago

+1 for LazyVim

[–] manito_manopla@lemmy.ml 9 points 1 day ago
[–] 2kool4idkwhat@lemdro.id 14 points 1 day ago (3 children)

I use Helix. It's kinda like a preconfigured Neovim. I really like it, my only complaint is that it (currently) doesn't have a filetree

[–] slowbyrne@lemm.ee 2 points 11 hours ago

I use Yazi and its amazing. Here's their docs on how to set it up as a file picker in helix.

https://yazi-rs.github.io/docs/tips/#helix-with-zellij

load more comments (2 replies)
[–] abominable_panda@lemmy.world 41 points 2 days ago (5 children)

Codium. It's VSCode without the proprietary stuff

[–] yogthos@lemmy.ml 3 points 1 day ago

I find codium is pretty great overall. It's become my daily driver now.

[–] krigo666@lemmy.world 6 points 1 day ago

Also Eclipse Theia, it has the same interface and functionality and it is compatible with most VSCode extensions (probably over 98% of them?).

load more comments (3 replies)
[–] Dungrad@feddit.org 8 points 1 day ago (1 children)
[–] badbytes@lemmy.world 1 points 7 hours ago

Yeah, geany is a simple and effective IDE. I chose to use vim with syntax highlighting.

[–] lime@feddit.nu 10 points 1 day ago

with the rise of LSP, i feel that ides have become less necessary. get an editor that you like, add an LSP client if there's not one built-in, then install the server for your language.

load more comments
view more: next ›