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 - "vi editor"
-
GAMER : After finishing the game.. "gg mates"
ME : After finishing my code in vi editor.. "gg=G"
bammm!!!
looks beautiful5 -
!rant
I'm currently helping a junior developer in my team to get on board. He is new to Linux and whenever I ask him to work on vi editor, I get to see that look on his face!16 -
*gets annoyed by how vi command in Ubuntu WSL points to vim*
To be clear, that's due to update-alternatives in Ubuntu, not WSL specifically.
*le me ducking how to install vi instead, because vim in WSL has scrolling issues*
"install vi ubuntu"
> How do I install and get started with vim/vi? - Ask Ubuntu
> apt - Vim installation in Ubuntu 14.04 - Ask Ubuntu
> Ubuntu Linux: Install vim Text Editor - nixCraft
-.- I'm not looking for vim ffs, I already have that installed.
"install vi ubuntu -vim"
> Same fucking results
"!g install vi ubuntu -vim"
> Installing the VI Perl Toolkit from Source Code—Linux - VMware
> FedoraDirectoryServerClientHowto - Community Help Wiki - Ubuntu …
> Learn How To Use Linux vi Editor And Its Commands - LinOxide
Oh for fuck's sake!!!
So here's my question because apparently search engines clearly can't point me to it, and Ubuntu doesn't seem to have vi as "vi" in their repositories either. Do our Canonical overlords allow people to actually make /usr/bin/vi actually be fucking vi?11 -
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 -
VIM! ViM! vim! Vi Improved! Emacs (Wait ignore that one). What’s this mysterious VIM? Some believe mastering this beast will provide them with untold mastery over the forces of command line editing. Others would just like to know, how you exit the bloody thing. But in essence VIM is essentially a command line text editor at heart and it’s learning curve is so high it’s a circle.
There’s a lot of posts on the inter-webs detailing how to use that cruel mistress that is VIM. But rather then focus on how to be super productive in VIM (because honestly I’ve still not got a clue). This focus on my personal journey, my numerous attempts to use VIM in my day to day work. To eventually being able to call myself a novice.
My VIM journey started in 2010 around the same time I was transiting some of my hobby projects from SVN to GIT. It was around that time, that I attempted to run “git commit” in order to commit some files into one of my repositories.
Notice I didn’t specify the “-m” flag to provide a message. So what happened next. A wild command line editor opened in order for me to specify my message, foolish me assumed this command editor was just like similar editors such as Nano. So much CTRL + C’ing CTRL + Z’ing, CTRL + X’ing and a good measure of Google, I was finally able to exit the thing. Yeah…exit it. At this moment the measure of the complexity of this thing should be kicking in already, but it’s unfair to judge it based on today’s standards of user friendly-ness. It was born in a much simpler time. Before even the mouse graced the realms of the personal computing world.
But anyhow I’ll cut to the chase, for all of you who skipped most of the post to get to this point, it’s “:q!”. That’s the keyboard command to quit…well kinda this will quit the program. But…You know what just go here: The Manual. In-fact that’s probably not going to help either, I recommend reading on :p
My curiosity was peaked. So I went off in search of a way to understand this: VIM thing. It seemed to be pretty awesome, looking at some video’s on YouTube, I could do pretty much what Sublime text could but from the terminal. Imagine ssh’ing into a server and being able to make code edits, with full autocomplete et al. That was the dream, the practice…was something different. So I decided to make the commitment and use VIM for editing one of my existing projects.
So fired the program up and watched the world burn behind me. Ahhh…why can’t I type anything, no matter what I typed nothing seemed to appear on screen. Surely I must be missing something right? Right! After firing up the old Google machine, again it would appear there is this concept known as modes. When VIm starts up it defaults to a mode called “Normal” mode, hitting keys in this mode executes commands. But “Insert” entered by hitting the “i” key allows one to insert text.
Finally I thought I think I understand how this VIM thing works, I can just use “insert” mode to insert text and the arrow keys to move around. Then when I want to execute a command, I just press “Esc” and the command such as the one for saving the file. So there I was happily editing my code using “Insert” mode and the arrow keys, but little did I know that my happiness would be short lived, the arrow keys were soon to be a thorn in my VIM journey.
Join me for part two of this rant in which we learn the untold truth about arrow keys, touch typing and vimrc created from scratch. Until next time..
:q!4 -
My first dev project. That is a toughie. Years ago (1998) I did some BASIC programming in HS. Then a few years after that (somwhere between 2002 and 2006) I did a lot of video game editing with hex editors and other tools to replace dialog to translate video games from Japanese to English, but there was not much coding there.
The first one I remember in recent times that involved any kind of coding was back in 2012/2013, there was a save state editor for Final Fantasy III on android (it didn't work for the iOS saves) but the editor was in Chinese. I ended up working with someone else to change it to English, so that others could use it easier. After that, I decided to code one from scratch for a different game.
I spent weeks working on it, and finally released a save editor for Final Fantasy Dimensions (I made sure it worked for both iOS and Android save files). It was my first great achievement, however it was way to many lines of code (I didn't know about loops or arrays back then, so I had a lot of repeating code). I eventually ended up making ones for Final Fantasy IV and VI, however those were never released to the public, as I had trouble getting the CRC to calculate properly every time.
This led me down the path I am now, going for my Bachelor's in IST with a specialization in Programming.1 -
So… I prefer nano over other terminal editors (Mainly because I don’t understand how to use others properly) and I wasn’t really aware of the VISUAL and EDITOR environment variables. So on my Arch machine most things would default to vi. Vi to me is like an annoying pop-up that really doesn’t want you to close it (Tho, one thing I did learn eventually was how to close it ). So at some point I quickly wanted to edit crontab as root and I just couldn't manage to get crontab to use nano. So what did I do?
sudo pacman -R vi
ln -s /usr/bin/nano /usr/bin/vi
I symlinked nano to vi and it finally worked. I know that there are probably countless ways this could’ve been done better but in that case I wouldn't have posted it here under wk81 ;)5 -
There are people I've seen myself multiple times; who quit vim/vi using Ctrl+Z . I was lucky enough to ask one person to just run "jobs". That was horrifying.
I just needed to share this somewhere ...8 -
Today I had to work on a server running SunOS.
For those that don't know, SunOS was last released in the mid 90's. To top it off the only available editor was vi. -
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 me Jetbrains idea based IDE/editor in part does just about everything right. Only need to really change the redo shortcut. They provide a warning now so you don't lose your undo history on ctrl+y.
On console both Emacs and vim work for me. These days I prefer vim. Nano will work when I'm a pinch but the lack of undo is really annoying. Especially when the cat walks over the keyboard. You just need start all over unless you can see what he did.
Vim has vertical block so you comment/uncommented stuff real fast. The cange word and change till are also real time savers. Vi is to basic and annoying for me, rather use nano than.
Gedit works great for me when viewing or editting a file real quick.
So yeah the situation dictates what tool suites the best.
Idea is where I can spend my time the entire day so if I had to choice one that would be it. -
ci tools in cooperation with git servers because i work on different machines and only one of them has the full development environment. (every other machine has only an editor (atom or vi) and git when it comes to dev tools)
-
Was helping a friend fixing apache url redirects he says I've got cent os i was a bit nervous. The configs were in httpd.conf file but as soon as i try to edit i see there is no nano editor
But there was vi editor, now I'm on call helping this dev and googling vim cheat sheet 😂😂😂😂😂, i had no idea how to edit the file. Its not that hard though.4 -
I've coding a long time on sublime as my editor of choice. But ever since someone pulled an inception on me, at the back of my mind is always this question "How good is vi/vim?"
Can anyone attest to its awesomeness or shittiness? I am impartial here. Just want to hear your views.3 -
It's always a matter of much is there to do and in what language...
There is the IDE-Zone, which is dominated by IntelliJ (CLion be praised when you do Rust or C++) for large stuff and heavy refactorings.
Always disputted by VS Code with synced settings. It's nice and comfy and has every imaginable language supported good enough, especially when its smaller change in native code or web/scripting stuff.
Then there is the "small changes" space, where Vim and VS Code struggle whos faster or which way sticks better in my brain...
might be you SCP stuff down from a box and edit it to re-upload, or you use the ever-present vi (no "m" unfortunately)
sometimes things are more easy for multi-caret editing (Ctrl-D or Alt-J), and sometimes you just want to ":%s/foo/bar/g" in vim.
I am sure that each of these things are perfectly possible in each of the editors, but there is just reflexes in my editor choices.
I try to stay flexible and discover strenghts of each one of my weapon of choice and did change the favorites. (Atom, Brackets, Eclipse, Netbeans, ...)
However there are some things I tried often and they are simply not working for me...
might for you. I don't care. and I'll just use some space to piss people off, because this is supposed to be a rant:
nano just feels wrong, emacs is pestilence from satan that was meant for tentacles instead of fingers, sublime does cost money but should not, gives me a constant guilty feeling (and I don't like that) that, and all the editors from various desktop environments are wasted developer ressources. -
Let's hope the government starts an initiative to get rid of fake editors. All the mainstream alternative editors will be banned from discussion in social media. People have to think critical and realize that there is only one editor: vi.1