Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "i used to use nano"
-
I tried vim for a few weeks. I almost used to it. But I didn't see how I could be more productive with it than with Visual Studio Code, at all, so I switched back. Maybe because I'm super fast with my mouse because of my 2500 hours of Dota. But knowing how to use vim is super useful when doing remote stuff via SSH. Nano too basic.13
-
@JoshBent and @nikola1402 requested a tutorial for installing i3wm in a windows subsystem for linux. Here it is. I have to say though, I'm no expert in windows nor linux, and all I'm going to put here is the result of duckduck searches, reddit and documentation. As you will see, it isn't very difficult.
First things first: Install WSL. It's easy and there's a ton of good tutorials on this. I think I used this one: https://msdn.microsoft.com/en-us/...
Once you got it installed, I guess it would be better to run "sudo apt-get update" to make sure we don't encounter many problems.
Install a windows X server: X is what handles the graphical interface in linux, and it works with the client/server paradigm. So what we'll do with this is provide the linux client we want to use (in this case i3wm) with an X server for it on windows. I guess any X server will do the work, but I highly recommend vcXsrv. You can download it here:
https://sourceforge.net/projects/...
for i3 just "sudo apt-get install i3"
Configurations to make stuff work:
open your ~/.bashrc file ("nano ~/.bashrc" vim is cool too). You'll have to add the following lines to the end of it:
"""
export DISPLAY=:0.0 #This display variable points to the windows X server for our linux clients to use it.
export XDG_RUNTIME_DIR=$HOME/xdg #This is a temporary directory X will use
export RUNLEVEL=3
sudo mkdir /var/run/dbus #part of the dbus fix
sudo dbus-daemon --config-file=/usr/share/dbus-1/system.conf #part of the dbus fix
"""
Ok so after this we'll have a functional x client/server configuration. You'll just have to install your desktop enviroment of choice. I only installed i3wm, but I've seen unity and xfce working on the WSL too. There are still some files that X will miss though.
*** Here we'll add some files X would miss and :
With "nano ~/.xinitrc" edit the xinitrc to your liking. I only added this:
"""
#!/usr/bin/env bash
exec i3
"""
Then run "sudo chmod +x ~/.xinitrc" to make it an excecutable.
Then, to make a linking file named xsession, run:
"ln -s ~/.xinitrc ~/.xsession"
Now you'll be able to run whatever you put in ~/.xinirc with:
"dbus-launch --exit-with-session ~/.xsession"
There's a ton of personalisation to be done, but that would be a whole new tutorial. I'll just share a github repo with my dotfiles so you can see them here:
https://github.com/DanielVZ96/...
SHIT I ALMOST FORGOT:
Everytime you open any graphical interface you'll need to have the x server running. With vcXsrv, you can use X launch. Choose the options with no othe programs running on the X server. I recommend using "one window without title bar".10 -
In fact I'm a sinful dev, so that I can't easily decide which one is worst. From indenting with tabs, or using nano instead of vim/emacs, to hardcoding database credentials on server, to many hacks and workarounds I use as actual "fixes" when the deadline is upon me and I've tried all I could. But it always led only to my own regret. For instance, my latest sin was that I prefered Debian over Arch and used proprietary graphic drivers to speed up my new setup. But ended up with a curse from St. Ignucius. (check my last rant)
But my worst sin probably goes to when I was "printf-debugging" some issue for a GSM controller on a raspberry pi. I forgot to remove one little print line and deployed the new "fixed" version. I didn't follow that project after that for like a month or so, when the client posted back the device and said that "it just doesn't work anymore". It seemed that raspbian didn't boot beacause the sd card was curroptted. I dd'ed through the card and I noticed that there are billions of lines of "DEBUG:: reading stream from 192.some.shitty.ip", took almost all over the 32G sdcard. Just as I suddenly remembered the cursed line I just added a month ago, I declared the sd card dead with no hesitation, dunce-commented the line (so the history would remember), implemented a time out for the thread containing it, setup a journald unit for my service and removed the redirection of process output to a log file, found a new sd card and installed everything again, and finally posted back the new "fix" to the client.
Moral: Never comfort yourself for the sins you have commited in the past kids, they certainly will come back to you. And also not to do any io especially write to a file on an SD card with ext fs, in a potentially infinite loop with no timeout.
P.S: I'd posted my last rant just before the new week rant last nigh. I really liked the St. Ignucius meme so decided to create a new one. He's very adorable :)1 -
The problem I have with atom, vscode, sublime, and notepad++ is that none are available on the command line over SSH, inside tmux. And that's where I do the vast majority of my text editing.
The first text editor I used on the command line was pico, the technological successor of which is nano. I used it because when I was in college in the late '90s, we used pine for our email, and pico was the default editor for pine.
When I got my first job out of college in 2000, I found out about vi, and very quickly fell in love with it, and its technological successor: vim.
The only reason I've never gotten into emacs is because I've never wanted for more than vi/vim. And also because as a system administrator, I'm logging into dozens, of not hundreds of servers a day. While vi or vim is guaranteed to be on all of them, emacs is not.
So, for me, the use of a desktop text editor like the ones I mentioned at the beginning of this post, just doesn't make sense to me. I almost never edit files that live on the computer where I'm sitting, and I'm not interested in doing a commit/push every single time I want to rerun a script.20 -
I was reminded of people's posts about preferred text editors in another post, so I thought I'd do the same, but also add some super old technology that I used along the way.
The first text editor I consistently used was pico. I used it to write my first webpage at school.edu/~username. It was a natural choice, because the it was the default text editor in pine, which is what we would all use for our email after opening a serial connection to the college's Digital Unix server. Or if we were the lucky ones who had a computer in a wired dorm, telnet. My dorm was not wired until my sophomore year.
I got my first job in tech in 2001, working as a night shift tier-one support technician. By this time, most people were using web based email, or POP3, but I wanted to keep using pine (or elm, or mutt) because I was totally in love with the command line by this time, and had been playing with Linux for two or three years by now. I arranged a handshake deal with a guy in my home town who had a couple well-connected NetBSD servers, to let me have an account on one for email and web hosting (a relatively new idea at the time).
I recall telnetting into my shared hosting account from the HP-UX workstations we had in the control room. I would look at webpages on HTML conventions and standards, and I kept seeing references to this thing called vi. I looked into it more deeply, and found that it was a text editor, and was the reason I always had to CTRL-Z out of elm. I was already finding pico to be lacking, so I found a modern implementation of vi called vim that was already installed on the aforementioned NetBSD server, and read through vimtutor on it. I was hooked instantly. The modality massively appealed to me, and I found editing files to be an absolute delight, compared to pico, and its nascent open source offspring/successor, nano.
My position on that hasn't changed in the years that have passed since then.
What's your text editor origin story?1 -
I recently decided to try out vim. I've got to say, I fucking love it!!! And since I hear you can customize it, I'm super looking forward to that!!!
Not that in quitting on Sublime or anything, I do want to give vim a try.2 -
So this is the story of myself getting from hating vim to find it pretty good.
When i started fiddling around with linux i was literally overrun by vim. I mean how the fuck should i remember all these stupid commands.
So there we go ... nano was my favourite (and only) editor i used.
Everything was fine in my little nano world. I saw some colleague editing every damn thing in vim. I asked him "man what the fuck are you damn crazy"? And thats where till that moment the deepest conversation about an editor in my life began. He told me he could do that much with vim, its almost everywhere nowadays and a must for any admin.
So after letting him tell me about every thing you can do he promised me he is going to help me getting started quicker. And i must say boi vim is really awesome. But for "real" development i still use a ide. Although i find myself programming go, python or bash scripts entirely in vim and its not that bad.
So if you find your way through the deep shit of that single damn command input down there you can get a pretty decent editor.
Dont get me wrong i am forced to use nano sometimes, when i help some of friends with their servers or so and they litterally uninstalled vim because they were to frustrated.
So as i am started to go into the devops area you get more and more towards you have to edit a file on a server, or just tweak around before automating the shit out of it.
And i must say vim has become a solid alternative for me to a full blown ide, or any other text editor.
So yeah i am gone from freaking hating vim to using it almost everyday. But why some people out their treat vim like a religion is not understandable to me in any way.
So whats your story why do you hate/love vim? Or are you just like me a "happy user" that would switch to another editor anytime it would be a better fit?3 -
EDITOR=nano sudoedit foo
Spare me please…
It's not that I don't know how to use vim/vi, I'm just lazy to get used to it…1 -
For a while I used vim or whatever plain text editor nano gedit but I got used to features like autocomplete and syntax highlighting etcetera when forced to use things like an eclipse and IntelliJ slash Android Studio. But when I'm usually using Atom these days. But I am increasingly more frustrated that my favorite language python does not have my favorite features in the editor. I guess I need to consider paid editors or at least just try some more free ones but I really don't want to invest the time. Once again I think I've convinced myself to just enjoy the nice things about atom. At this point i like it better than komodo7