[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vr / w / wg] [i / ic] [r9k] [s4s] [vip] [cm / hm / lgbt / y] [3 / aco / adv / an / asp / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / qst / sci / soc / sp / tg / toy / trv / tv / vp / wsg / wsr / x] [Settings] [Home]
Board
Settings Home
/g/ - Technology



Thread archived.
You cannot reply anymore.



File: vim.png (49 KB, 688x688)
49 KB
49 KB PNG
There really isn't a better text editor than this.

It's so fucking quick, I can edit files, and do shit in the terminal all-in-one at lightening fucking speed.

Why are you using anything else? Learn Vim, and I promise you, you will never go back to sublime text.
>>
what advantages does vim offer over something like sublime or atom?
>>
>>62874256
>It's so fucking quick, I can edit files, and do shit in the terminal all-in-one at lightening fucking speed.
>>
>>62874280
>it's fast
assertion
>edit files
basic function of any editor
>do shit in the terminal all-in-one
many ides feature a terminal, they also don't make you kill a process before doing shit either
>>
>>62874223
spacemacs
>>
>>62874223
I dont know man, my hands start hurting when I only use the keyboard..


probably because my muscular shoulders are too wide, so I have to relax them reaching for the mouse from time to time..


so sadly, no vim for me :)
>>
>>62874256

six month vim user here, switched over from sublime

imo if you learn your keyboard shortcuts in sublime you can to a lot of stuff (but not everything) you can in vim regarding editing text. But vim's shortcuts are a bit more intuitive imo, and have easier mnemonics - in the end you gotta invest time for both to git gud.

things i think vim does better:
> changing between files, finding files you touched before, working with a lot of files in general
> build around repeating stuff, the more repetitive a task the better choice vim can be
> programmable to death, you can create a shortcut that does anything you want on a file

there are a few things that sublime does better but as a whole experience I prefer vim. The reason I moved from sublime was that I was working with 10+ Rails projects at the same time and i had them all loaded in sublime to quckly move around and indexing and other shit got really slow. Vim doesn't seem to care about this that much.

In the end, use what you like.

Except Atom. Atom is shit.
>>
>>62874223
Yea its keybinds are fun so to speak not necessarily quick - that why I've implemented them in my IDE - Visual Studio enterprise.
>>
>>62874332
>Except Atom. Atom is shit.

i just recently hopped over to atom because i couldn't be fucked configuring sublime to do babel autocompletion again
>>
>>62874360

To be honest I'd prefer to use Atom myself over Sublime too but it's so laggy it's a shame. Thankfully I liked Vim.
>>
>>62874360
Figure it out, pleb. Don't give up.
>>
I don't want to start the nth flame war between Emacs and Vim, but after becoming a bit proficient in using Emacs+AucTeX, I am now learning to use Python.
Should I keep using Emacs or should I switch to Vim for Python?
>>
vim IS fast. it opens huge files instantly.
>>
>>62874552

was fun to show that at my coworker you thought that it made sense that sublime takes 20 seconds to open a file of 100mb

now if only vim could handle very long lines nicely.... nothing's perfect i guess
>>
>>62874620
It can, though. You just gotta git gud.
>>
>>62874723

it gets really laggy for me, any tips ? I'm talking log files that have single lines that are huge
>>
>>62874223
>have to press a button to start to type things
>in a text editor
>>
What advantages does vim offer over something like vi?
>>
>>62874223
what i love about vim is that you can use the hotkeys everywhere

i'm not masochistic enough to use it for development, but most ides have a vim plugin. ideavim is even rolled with intellij. so you can use the same bindings in pretty much everything you do

imo if you go full autist with plugins you are doing it wrong, the most i do is a quick edit of vimrc to get stuff like line numbers and spaced tabs
>>
>>62874519
Emacs has a great integration with the Python REPL, wouldn't give up on that.
>>
>>62874223
Vim is great for *exactly* what you said: being quick.

For everything else: emacs.

I do like Vim’s nav key arrangement though, so they’re in me .emacs file.
>>
>>62874223
Do people use Vim for large projects? I've tried it and shit freezes for about 30 seconds when doing mundane stuff like Go to definition, not to mention it's not exactly precise.
>>
>>62875068
In many distros, vi is just an alias to vim.
>>
There really isn't a better text editor than this.

It's so fucking quick, I can edit literal terabytes, and do shit in the terminal all-in-one at lightening fucking speed.

Why are you using anything else? Learn Ed, and I promise you, you will never go back to Vim bloat.
>>
>>62876268
Not on any I use.
>>
>>62875068
Multi level persistent undo.
Graphical User Interface (GUI).
Multiple windows and buffers.
Syntax highlighting.
Spell checking.
Folding.
Diff mode.
Plugins.
Asynchronous communication and timers.
Repeat a series of commands.
Flexible insert mode.
Visual mode.
Block operators.
Help system.
Command-line editing and history.
Command-line completion.
Insert-mode completion.
Long line support.
Text formatting.
Extended search patterns.
Directory, remote and archive browsing.
Edit-compile-edit speedup.
Finding matches in files.
Improved indenting for programs.
Searching for words in included files.
Automatic commands.
Scripts and Expressions.
Viminfo.
Printing.
Mouse support.
Usage of key names.
Editing binary files.
Multi-language support.
Move cursor beyond lines.

(see :help vim-additions for details)
>>
>>62876298
I see. Thanks. A couple of those seem alright.
>>
>>62874223
Kakuone aims to replace it. Haven't tried it because I invested too much time in vim already but it looks promising and technically more efficient with less keystrokes and better visualization what you are currently doing
>>
Emacs is superior in almost every way. The only thing vim beats it in is startup time, and that hardly matters if I pay the cost once and never have to leave.
>>
>>62876926
dude if I had 4 arms emacs might be nice but those shutcuts of emacs are so hard to hit
>>
>>62874296
>:!
>he also doesn't use screens, or atleast other 'new' terminal window shortcuts in his terminal emulator
>>
>>62877097
I can't hit the default shortcuts either. The trick is to customize the shit out of it. I've got my basic cursor movement tied to C-<I,J,K,L>, for example. Emacs really shines when you want to customize things.
>>
>>62877161
vim does too
>>
>>62874296
>They don't make you kill a process before doing shit
Use nvim
>>
>>62877238
Not nearly as well as Emacs. Can you emulate the entirety of Emacs behavior inside vim? Because you can do the reverse in Emacs.
>>
>>62874360
At least go with VSCode, have some fucking self respect, man
>>
>>62877270
More features != better
I'd rather have a piece of software for every task, and do it well. I don't need bloat
>>
>>62876926
Do you suggest that I try to learn emacs when I invested a good chunk of time into vim already? What advantage will I have?
Also what is a good starting point to learn the basics?
>>
I've used vim/emacs for decades, but jumped ship to vscode, it's so damn comfy
>>
File: vimp.gif (122 KB, 681x408)
122 KB
122 KB GIF
>>62874256
>>
>>62874519
jedi isn't great
t. vim+python user
>>
>>62877350
Not bloat. Bloat would be if every potential feature were packaged with the basic version of the program. Not every feature is included with the basic version of Emacs, but it allows for maximum extensibility in the realm of text manipulation and related workflows.
>>
>>62877097
Actually, they do the trick pretty well for a french azerty keyboard.
>>
I switched over to nvim from sublime + vintage mode. Nothing beats editing from the command line
>>
>>62877737
>tfw using gvim
>>
>>62874330
Split keyboard maybe?
>>
>>62877805
>>62877805
quick, pull in the line, somebody fell for the bait
>>
>>62877396
I think it depends entirely on how far into vim you are, and what you're using it for.

The main advantage I can give without knowing what exactly you're using it for is a universal, customizable interface between all your text-related activities. The ability to handle emails, programming, scientific/mathematic write-ups, and general writing under the same customizable interface is super comfy.

I use it primarily for programming, so most of the things I gravitate toward aid in that. Stuff like ivy/helm fuzzy completion/search, yasnippets (especially with the ability to execute elisp inside one), sx (stack overflow searching directly in-editor is really nice).

Other than that: wolfram integration, instant LaTeX visualization, org-mode if that's your thing
>>
>>62877896
thanks I'll try emacs and learn it to some degree, worst case scenario is I have 2 editors to choose from. Sounds definitely nice with the stack overflow searching
>>
>>62874336
>Vim keybinds
>not quick
Are you serious? They're the entire point of the editor. Maybe you just need to get good
t. Someone who uses vim keybinds in my visual studio IDE for work
>>
>>62877510
>>62877321

vscode is the mozilla firefox of editors. it's slow and laggy as fuck.
>>
>>62879521
it's fast on my machine ;^) maybe you should stop using a potato for a computer
>>
Here is the list of Youtube videos that took me from knowing nothing to being so comfortable as to installing a vim plugin on my browser. Ignore titles these videos are great for beginners, just watch them in this exact sequence:
Mastering the Vim Language https://www.youtube.com/watch?v=wlR5gYd6um0
How to Do 90% of What Plugins Do (With Just Vim) https://www.youtube.com/watch?v=XA2WjJbmmoM
Let Vim Do the Typing https://www.youtube.com/watch?v=3TX3kV3TICU

To move beyond that read Learn Vimscript the Hard Way by Steve Losh http://learnvimscriptthehardway.stevelosh.com/

NOTE: I've realized what emacs-like bindings are best suited for when I tried TeXmacs.
>>
>>62874310
This is the correct answer
>>
>try to type something
>delete 20 lines by accident
okay now that I've had my fun, tell me how to make my vim super sexy for C dev so I can be the cool kid in my class
>>
>>62880332
Type "u" to undo. For C programming onsider using Ctags via the taglist extension.
>>
TIP: You hear all the time that vi keys are used everywhere, one such example is as a pager, the program "less" use it. Inside the program type "h" to see the keys.
>>
>>62880192
Saving your post, thank you
>>
>>62874223
Because I personally prefer VSCode.
>>
>>62880703
Why do you prefer vscode?
>>
>>62880752
I find it easier to use OOB, and I don't have all the time to set vim up. Vim isn't bad, I'm just comfortable with VSCode
>>
>>62880192
Vimscript is pure distilled cancer. It's possibly the worst language ever conceived, I would sooner program in ArnoldC https://lhartikk.github.io/ArnoldC/ before I would write anything in Vimscript. Anybody interested in Vim there's an entire course on it at CMU detailing all the problems (like that cancer, Vimscript) https://www.andrew.cmu.edu/user/haoxuany/vim/ plus this excellent classic stackoverflow post 'Your problem with Vim is you don't grok Vi' https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Also search around for 'Vim as an IDE' in addition to above, a recent presentation at CMU. I could never accept Vimscript so have been using Emacs all this time
>>
Can Vim properly do symbol renaming in a source file w/o a plugin?
>>
>>62880861
Something like this?
https://stackoverflow.com/questions/597687/changing-variable-names-in-vim
>>
>>62880906
Yeah. So in most IDE's, if you press F2 over a variable or function name, you can rename it, and it will rename it in every source file it is referenced in the whole project folder, even unopened files. Note that this is also different than global search/replace, since it won't change the same word in comments or wherever else. Very handy. It seems Vim can't do it out of the box.
>>
>>62881021
I suppose, but if you're going to use vim like an IDE you might as well set it up like one. I get where you're coming from, but refactoring likely isn't something you'll be doing daily, and forcing vim to not use a plug-in just to prove a point is kind of an empty victory
>>
>>62881067
>refactoring likely isn't something you'll be doing daily
I'm currently debating learning vim, and I'm trying to see what it can or can't do. When I develop, I use refactoring quite a bit.

>forcing vim to not use a plug-in just to prove a point is kind of an empty victory
I'm just trying to figure out if Vim is right for me, or if I could set it up to be.
>>
>>62875037
you can set vim to start in insert mode
>>
>>62876248
emacs is too bloated to be a text editor and lacks too many features to be an IDE. kinda like C++, it tries to be too many things and as a result is never the best tool for the job
>>
>>62881147
Fair enough, but if that's the case why would you add in the stipulation that vim can't use any plug-ins? Wouldn't you want to know the full capabilities it can do plug-ins and all? Also, your IDE likely has one that gives you vim key binds so if you don't want to learn vim itself at work or wherever you're working on your projects, you can still get the key binds
>>
>>62880861
vim is a text editor, not an IDE
>>
>>62881200
>Wouldn't you want to know the full capabilities it can do plug-ins and all?
I'm assuming it can do everything, since it's quite powerful, and I'm sure there's a plug-in for everything too. I mean, even w/o a plug-in you could probably refactor good enough with a clever command.

>>62881216
>vim is a text editor, not an IDE
true, but it can do what most IDE's can do, especially if you can bash script. i'm still figuring things out.
>>
>vim is fast
Why do people say this?
How do you compile it so it is fast?
I find it slow as fuck.
And I am not talking about the way you do things although that can be slow as well.
I mean the UI takes more time to show you the changes you make.
>>
>>62881303
What? Compilation has nothing to do with the speed at which you edit text after the fact. Do you have evidence of the UI being slow? I'm using it at work, as we speak, and the screen updates as quickly as any text editor
>>62881297
Sure, but if you're learning vim and wanting to try it, a plug-in would better suit you so you don't get overwhelmed too early
>>
>>62881333
>>62881303
Sorry, misread. Why would you need to compile vim at all? It's quick enough out of the box. Maybe you're screwing something up when you compile it?
>>
>>62881333
I was told it was because I installed the vim-nox package and there was a faster one available, so that's why I asked how to compile it to make it fast.
For me, the UI is just slower to update.
I can't record it with a high enough frame rate to show you, but the worst offender for me is when I edit multiple lines.
>>
>>62881397
I don't know what to tell you. May I suggest removing all the extra stuff and just installing nvim?
>>
>>62881297
maybe i have high standards for an IDE. vim can't auto-sort my imports, filtering the unused ones. it can't do intelligent, code-aware refactoring. it can't integrate with gradle or spring-boot. it's auto-completion is a little buggy. it won't let you set breakpoints. the list goes on and on.

i mean, i love vim, i use it every day for shell scripting, python, and text editing, but i wouln't use it for java or large c programs.
>>
>>62881421
>not using vim key binds in your IDE
>>
>>62877640
Prime?
>>
acme's quicker, especially with in piping the text selection or entire document through a load of programs
>>
>>62874296
>they also don't make you kill a process before doing shit either
You do realize that 99% of console programs let you press Ctrl-Z to freeze and background the program, right?
>^Z
>run other command
>fg
>>
>>62881438
>didn't read the post
>>
>>62881421
>Java
So use IntelliJ and its vim emulation plugin. It actually works pretty well.
>>
>>62881473
You said you would not use it for large Java/C programs but unless you're doing text editing, shell scripting, and python in an IDE I assumed you did those things not in an IDE and Java/C in an IDE. Correct me if I'm getting this wrong, by all means
>>
>>62881491
i run intellij locally at work (java, windows), but all my python and shell scripting is done remotely (ssh session to headless linux box back home). i use the vim keybinds in intellij
>>
>>62881421
>maybe i have high standards for an IDE
yeah i'm so used to traditional text editing and ide's with their language plug-ins. my workflow is good enough in them.

i'll probably just use vi/vim as a nano replacement and for quick scripting and text editing. it's fun to use. plus ide's have vim keybinding plug-ins which is nice if i ever get good.

knowing vim is also good for those cli programs that use vim keybindings, like ranger for file management.
>>
>>62881504
>>62881491
btw, i find the vim keybinds far less useful for java compared to scripting languages. especially the spring-web projects.
>>
>>62881530
and vim is indispensable for running headlessly or working on high-latency remote systems.
>>
File: 1471007438949.jpg (62 KB, 690x460)
62 KB
62 KB JPG
>>62877321
>>62877510
>>62880703
>vscode
https://en.wikipedia.org/wiki/Visual_Studio_Code
>Visual Studio Code collects usage data and sends it to Microsoft, although this telemetry reporting can be disabled.[19] The data is shared among Microsoft-controlled affiliates and subsidiaries and with law enforcement per the privacy statement.[20]
https://www.microsoft.com/en-us/privacystatement/EnterpriseDev/default.aspx
>Finally, we will access, transfer, disclose, and preserve personal data when we have a good faith belief that doing so is necessary to:
>comply with applicable law or respond to valid legal process, including from law enforcement or other government agencies;
>protect our customers, for example to prevent spam or attempts to defraud users of our products, or to help prevent the loss of life or serious injury of anyone;
>operate and maintain the security of our products, including to prevent or stop an attack on our computer systems or networks;
>protect the rights or property of Microsoft, including enforcing the terms governing the use of the services - however, if we receive information indicating that someone is using our services to traffic in stolen intellectual or physical property of Microsoft, we will not inspect a customer's private content ourselves, but we may refer the matter to law enforcement.
I seriously hope you compile your own.
>>
I like vim for just general text editing, but I find it to be clunky when doing large scale refactoring. I'm sure vim wizards can make it work, but at least for me it's an easier task when you have mouse support.
>>
>>62881586
It's not hard to block all network access to an individual application if you're really concerned about that shit.

Not that I'd ever actually use Visual Studio Code.
>>
>>62875037
Yes it's a text EDITOR, not a text adder. If you're a programmer, you'd know that most of your time is spent editing code, not typing code. That's why your far better off with something that optimises the editing process, cause it can't make you type or think faster.
>>
>>62881623
It's also not hard to use alternative software that respects your privacy.
>>
>>62881612
There is mouse support, but you don't need it in practice. I mostly just use it to scroll if I'm just reading a file.
>>
>>62874519
I'm using sublime because I dont't have the tiniest nerves to learn some apparently useful shit in other editors.

But have a collegue who is using Emacs. He started it using it a few months ago, he is still struggling from time to time, but he says it's pretty dope.

Also for me, emacs has one of the best font rendering I mean holly shit.

So go for Emacs.
>>
>>62874519
it literally doesn't matter as long as you commit to one, you producitvity will be great either way
>>
>>62881198
Bullshit.
>>
>>62874223
What are the use cases of an advanced text editor? Coming from a background of notepad. What exactly would you use something like this for? Programing? Only just getting into linux from windows and I'm still pretty technologically illiterate.
>>
Unfortunately I could not find an easy way to securely open a GPG file but then also read it with an org-mode plugin. Emacs is better doing things like that.
I do use vim for quick editing tho.
>>
>>62874223
>Why are you using anything else?
Because i spend 99% of my time on wangblow or a graphical environment, the only time i have to work in a terminal is when i have to ssh into a server and it doesn't happen every day.
>>
>>62883548
>What exactly would you use something like this for? Programing?
yes
>>
Is there any advantage to neovim as compared to vim, other than say huge files? And where is the ed copypasta?
>>
>>62880814
Look again at the other post beore spouting nonsense.
>>
File: 1507096738256.png (57 KB, 203x252)
57 KB
57 KB PNG
vim is indeed the best and lightweightest text editor out there, but the learning curve is so steep ... :'( I have hard time adapting
>>
File: Untitled.png (185 KB, 1332x801)
185 KB
185 KB PNG
So I've decidd it's time to stop telling /g/ that I'll learn emacs soon and instead just do it.
>ctrl + p,b,f,n to move
what the flying fuck? who thought these were sane defaults?
>>
>>62884699
Vim is lightweight? fuck the ass out.

All the WYSIWYG editors are bloated. Use ed instead.
>>
File: god-emperor-trump.jpg (140 KB, 734x950)
140 KB
140 KB JPG
>>62874223

VIM master race
>>
>>62884864
>previous
>backwards
>forwards
>next
makes sense to me
>>
>>62884929
that actually makes sense. cheers anon
>>
>>62884864
>>ctrl + p,b,f,n to move
>what the flying fuck? who thought these were sane defaults?
They obviously aren't, but then again, why do you not already know these keybindings? Have you never used a terminal?

>inb4 "i use vi(m) mode"
>>
>>62884864
Vim's got some dumb shit too.
Why w to move forward 1 word and b to move backward 1 word? Why not use two keys next to each other?
>>
>>62885028
i do use the terminal, i guess i've just never used things besides the arrow keys to move in the terminal.
>>62885052
i've always thought of it as (w)ord foward and word (b)ackward. I'm still getting used to emacs (again default) not having normal and insert mode. I'm not giving up on learning it, it's just weird
>>
>>62885157
>i've always thought of it as (w)ord foward and word (b)ackward.
That's why they picked them, but it's silly to spread out the keys just to satisfy abbreviations.
>>
>>62885179
Yeah, I think the issue is needing to hold down C or M to input the commands
>>
>>62884864
I just recently installed emacs too. It didn't start because I didn't have imagemagick installed.

>>62885179
It's not that silly when you can figure the keys out by thinking of what you want to do.
Delete inside quotemarks, d i '
Yank 4 words, y 5 w
And some such. Don't even need to remember shit.
>>
>>62885179
I can give you a reason why it's not silly. Because not everyone uses QWERTY.

On dvorak I can still understand w and b instead of having to mentally map their position on a QWERTY keyboard
>>
>>62885339
>Yank 4 words, y 5 w
???
>>
>>62885339
This is also why I love vim, there's an infinite amount of shit to learn.

Thanks anon, just learned what "i" does
>>
>>62885413
You can use 'a' instead of 'i' if you want to include the quotes.
>>
>>62885409
typo
>>
who vim/gruvbox here ?

comfy as fuck
>>
File: 1507548477284.jpg (77 KB, 669x670)
77 KB
77 KB JPG
>>62885736
>gruvbox
>>
>>62885736
what color scheme is that?
>>
>>62886362
only feminine ones
>>
>>62886870
I throw up a little in my mouth every time somebody mentions "feminine" dicks

>>62885736
this is beatiful
>>
I use nano :))))
>>
>>62886906
>I throw up a little
you'll be alright then.
>>
>>62886420
looks like solarized light theme with tweaked brown pallet
>>
>>62886420
>>62887006

are you blind/retarded ?
>>
>>62874223
There really is a better editor than Vim. All you need to ask is, “How can we improve on Vim?”

The answer is, swap the grammar around so you see what you’re operating on before you do, make the selection mechanism a multi-select by nature, build in a bunch of commands that do common tasks, and build a shell piping mechanism to do more complex stuff that’s not built in.

Bam. All Vim plugins obsolete, and a faster editor to boot. Everything I could ever ask for.
>>
>>62887017
neither
>>
>>62887148
then you should figure the colorscheme yourself like the rest of us
>>
>>62884699
See >>62880192
>>
>>62874223
i use colemak and it doesn't look like there is any support for it in vim at all
>>
>>62887067
If only was GPL.
>>
>>62874223
What's so superior about text editors?
If you make a program with it you can't even compile and make it work
>>
>>62879521
t. 2gb ramlet
>>
>>62887838
It's public domain ... That's even better anon
>>
File: 1503589614466.png (148 KB, 262x451)
148 KB
148 KB PNG
I want to compile and run my C program in Vim by pressing F5 in normal mode and then if compilation fails for Vim to jump to the line GCC reports. Any advice?
>>
>>62874310
patrician
>>
What editor is this?
>>
>>62887067
What editor is this?
>>
>>62874332
So it's just notepad++ except it has keybinds built for paraplegic retards and looks like ass
>>
>>62888704
Kakoune
>>
>>62888329
isnt it possible that gcc reports multiple lines?

also line numbers in the error message arent necessarily reliable and you should read the message to get a better grasp of what going on.
for example, if you're just missing a random semicolon gcc will rarely give you the correct line number.

just go through compilation errors manually, you lazy fuck
>>
>>62888755
>isnt it possible that gcc reports multiple lines?
There's also a flag to terminate on the first error, so it depends.

>just go through compilation errors manually, you lazy fuck
What happened to computers doing things for us?
>>
>>62874743

set synmaxcol=200
>>
>>62887850
You use a compiler. Your text editor does one job, your compiler does another. It makes sense and it's only slightly different than using an IDE after you've configured it
>>
I'm new to vim, what is the correct way to compile and run/test what you've coded?

Here's what I'm doing right now:

Finish coding
:wq

In the terminal write:
g++ -o programExecutable program.cpp

If there are errors:
read about them in the terminal
mentally remember where the errors are
vim program.cpp
fix errors

If there are no errors:
./programExecutable
test program to make sure it's functioning as intended

It feels pretty time consuming compared to just hitting a function key and getting a debug output while the editor is still running, alongside the editor highlighting specific lines where the errors are.
>>
>>62891183
Do you know that you can have multiple terminals or terminal panes open at once? There are also vim plugins for linting.
>>
>>62891183
you can execute arbitrary terminal commands from vim. Instead of quitting and then running gcc, just run
:!g++ -o programExecutable program.cpp
directly in vim.

There are also linting plugins like Ale which will run your code through LLVM when you save and embed any compiler warnings or errors directly into your editor to show you the afflicted code lines
>>
Vim + taglist + cgdb
You're welcome
>>
>>62891270
Thanks for recommending the most popular vim script that exists. Managed to open our eyes to a real obscure gem
>>
Get pathogen and ctrl+P and then you have A GOAT editor
>>
>>62891183
You can have more than one terminal open, anon. Instead of closing out of vim, just save and then compile in a different terminal
>>
>>62891183
on .vimrc
you can add this

nnoremap <C-b> :!make <CR>
nnoremap <C-c> :!make clean <CR>
nnoremap <C-t> :!make test <CR>
nnoremap <C-x> :!make run <CR>
>>
>>62880192

Saving this, thanks anon.
>>
>>62891340
>pathogen
>not vim-plug
>>
>>62891362
Doesn't the make command require a makefile?
>>
>>62891575
yes but you can replace it with your own building approach, you can even write a function to generate the build scripts vim has his own scripting language inside.
>>
>>62874310
Just werks with sane defaults, it's Vim with emacs power without the need to customize your config file everytime.
>>
File: comfy helper.png (44 KB, 747x686)
44 KB
44 KB PNG
>>62889189
>>62888329
I searched “vim jump to gcc error” and clicked on the first link: https://stackoverflow.com/questions/3031009/what-does-the-compiler-command-do-in-vim#3031025

As for F5, put
nnoremap <F5> :make<cr>
(or whatever command you need to run) into your .vimrc
>>
>>62891333
Didn't realize it was that popular.
>>
>>62892352
F5 thats very pajeet
>>
>>62891747
if you're not customizing emacs, you're missing out on 90% of emacs
>>
>>62893200
goes to show what a retarded design emacs is. A good text editor should be good out of the box, and not require learning a DSL and endless configuration to make it useable
>>
>>62894088
>a good text editor should appeal to the least common denominator
>>
>>62894174
are you that retarded that you think good design, sane defaults and a good featureset out of the box is a bad thing?
>>
>>62877270
You can slowly emulate any software if you load 100 VMs on your machine
>>
File: kldjlx33.jpg (25 KB, 437x437)
25 KB
25 KB JPG
>>62876223
>>62876248
>>62876926
>>62877270
>>62881717
>>62883952
>>62893200
>>
>>62874223
Or people should just use whatever they are accustomed to you know. Why waste time trying to learn a new editor if you are already productive in your current one?
>>
>>62894951
>Why bother learning new skills, learning new tools, when you can just stay the same
>>
>>62874223
>>62874256
What advantages does vim offer over something like notepad?
>>
>>62895113
Read the thread
>>
File: a-sign.jpg (30 KB, 410x363)
30 KB
30 KB JPG
>>62883548
>What are the use cases of an advanced text editor?

IT related tasks. ie. you've copied a long ul block from some html, and you want to get into a cvs file with some other info, properly escaped and formatted.

You have a lengthy quiz. You need to do stuff with the blank lines, change the formatting, swap the 'one answer per line' to single lines of comma separated answers.

It's great for stuff like that.

There are some awesome links in this thread.
>>
>>62895295
regexes seem to be fundamental to all the cooler things that make me a happy vim session.
>>
>>62895113
God tier editing, also the lightweight nature is nice. Watch the videos recommended above if you are new.
>>
>>62895113
You reduce the number of keystrokes. Like for deleting a word, it takes two keystrokes, deleting an entire line also takes two keystrokes.

Imagine macros but easier.
>>
>>62877350

I'm getting sick of this "Emacs doesn't follow the UNIX philosophy" shit.

The part of UNIX-like tools that make them so usable is their ability to to work with other tools. Piping output into a file or another program, for instance.

Take a look at someone working with GDB in Emacs. Its beautiful. Emacs hooks into GDB and displays the current line the debugger is at, stack frames, in scope variables and their values, and everything else you'd want to see to assist in debugging, all laid out in temporary buffers that clean themselves up upon termination of GDB.

That's the power of UNIX philosophy. A text editor is a display information. If you can't visualize all sorts of information, then you aren't doing your "one thing" well.
>>
>>62895685
But anon that's what a mouse is for
>>
>>62897024
you don't use it, it slows down your editing process
>>
NeoVIM>VIM 8>emacs>sublime>atom>>>>>>>>>ed
>>
>>62874223
Yup vim is great. all you need to know is
s
esc->wq
wq!
w
>>
>>62891183
I normally have a one terminal running tmux, split down the middle, vim in the left window and the shell in the right on, so I can edit on one side and compile or have a manpage open on the other side
>>
>>62897053
ED IS THE STANDARD EDITOR
.
>>
>>62893200
you can customize everything, spacemacs is just some comfy defaults
>>
>>62893200
You can customize spacemacs if you want but the default configuration works for me, i have barely changed the configuration file.
>>
>>62897279
?
quit
?
^X
?
^C
?
exit
?
:exit
?
:x
?
bye
?
q
?
>>
>>62897053
You forgot nano between NeoVim and Vim8
>>
>>62874330
set mouse=a?
>>
I tried Emacs for few month.
After I got few packages, it got slower at startup. Especially fucken checking melpa for update each time.

Swiper search and the syntax checker / getting the doc of the function you're in / auto complete checking the includes (yasnippet iirc) were goat.

These are the only things I missed when coming back to vim.

I wasn't much an orgmode fag.

vimscript a shit tho.
>>
>>62881586
>telemetry reporting can be disabled
>can be disabled
>>
File: dpxi4E4.png (37 KB, 557x605)
37 KB
37 KB PNG
>>62874223
Visual Code is the best editor out there. Everything pales in comparison.
>>
Anybody here got experience with Kakoune? Is it comfy?
>>
>>62874223
>There really isn't a better text editor than this.
Except all the better commercial text editors when it comes to text editing and even meme editors like VS Code when it comes to software development.
>It's so fucking quick, I can edit files, and do shit in the terminal all-in-one at lightening fucking speed.
Bitch please, a sufficient complex colour theme config slows down even startup to a couple of seconds. Not to mention the lazy gap-buffer implementation Vim still uses.
>Learn Vim, and I promise you, you will never go back to sublime text.
Sure, going from a barely mediocre GUI editor which only strong part is its price and test period to a barely mediocre CLI editor.
>>
>>62876262
no
/bread
>>
>>62899606
>using a fucking web browser to edit code
kys
>>
>>62881468
>let you
It's handled by bash and the kernel, the process doesn't have a choice in the matter
>>
>>62902986
You can actually capture SIGTSTP
>>
>>62903053
Then why doesn't sl do that? It captures control+c and control+d
>>
>>62903065
Ask the dev.
>>
>>62903065
>>62903101
Oh, and CTRL+D isn't a signal it just enters the EOF character.
>>
>>62874223
Use neovim. Vim but better basically.
>>
>>62874519
Just pick one and stick to it, if youre decent at emacs already dont waste your time learning vim.

t. vim user
>>
File: 1496292281493.jpg (100 KB, 1267x887)
100 KB
100 KB JPG
>ssh into work's backend boxes
>they have vim
>vertical splits, syntax, and a bunch of other useful things weren't enabled when they compiled the package

At least I have tabs I guess.
>>
>>62903538
What are the benefits of using Neovim over Vim?
>>
>>62903667
as a long time emacs user I still find it fucking annoying when I ssh into a box with no emacs.

vi/vim is everywhere and worth learning....
>>
>>62903915
It has an .io domain, that makes it hip.
>>
>>62903923
This, everything comes with vi at the very least so it's worth knowing basic functionality.
>>
>>62903915
https://neovim.io/doc/user/vim_diff.html#nvim-features
>>
>>62881198
>t. never used emacs
>>
>>62895794
this.
unix philosophy is great and emacs plugs into it really well. it's like being in a cockpit for linux
>>62903923
have you used tramp? you can edit files and still use most emacs functionality through ssh, with all the added benefits of still being in the same emacs session.
>>62903954
tru tho
>>
>>62904514
yeah I use tramp and it rocks.

nevertheless being in a vim session and spamming key commands to gtfo will happen sooner or later regardless.

better to know the basics.
>>
>>62903923
learn ed instead, that's everywhere
>>
>>62904566
yeah, but it sucks compared everything else. vi is usable and in as many places
>>
>>62904600
a
>using slow bloated editors like vi
>not using THE standard text editor
>not symlinking vi to ed
.
w ED.shitpost
q
>>
recently switched from Atom to VSCode, despite some visual annoyances it works wonders (in my machine)
>>
>>62904695
>switched from one shitty web editor to another shitty web editor
good for you I guess
>>
>>62874223
Not OP, but my UNIX teacher back in college (early 2000's) had us learn vi due to the prevalence. His rationale was that if you learn vi, you will be able to edit files in just about any unix environment without having to consult a dreaded manual. It may not be the latest, greatest, or the best... but it gets the job done perfectly well.
>>
>>62897306
>>62897785
desu i found editing spacemacs config more intimidating than base emacs. and emacs is easy enough to config especially once you realize you can look up the documentation of any elisp variable or function, or their implementations.

you only really need to know about mode-hooks, major-modes, and minor-modes to get a fine control of the features you're using
>>
>>62874223
man Vim and Emacs can't debug for shit

it doesn't feel right or nice to have to switch software for this just to debug

the "speed" is the keybindings which other software has as presets

why not use something that can actually be used on a project longer than your baby dick and click on the Vim preset
>>
how can i turn vim into my ide of whatever lang of choice?

C++
Python
Java
Lisp
JS
etc

>inb4 you don't know all of those
I don't. It's just useful in case some anon codes in one of those.
>>
>>62905227
>Intellisense plugin or use ctags for autocompletion
>tmux or tiling window manager to compile and run the program
>Refactoring: Learn regex and maybe get help from some plugins (will always be harder than in a real ide)

You will never have the real experience, but you can be on par with productivity, especially if you use marks and registers. But the learning time is much higher.
>>
File: buffer-grep.png (88 KB, 1048x480)
88 KB
88 KB PNG
I think howl.io is comfy, it's lacking a few advanced features, but it's ok for simple editing
>>
>>62884864
you could always just use the arrows

also either enable windmove or get ace-jump because the default way of moving between windows sucks
>>
>>62884864
(p)revious
(b)ack
(f)orward
(n)ext
>>
>>62907162
even if they are mnemotic, it doesn't help when you can't reach the keys and have to rebind them anyways
>>
>>62907173
what's hard about reaching them?
>>
>>62907194
They use different hands to reach which is normally not a problem, but together with ctrl modifier this makes for awkward hand movements
>>
>>62897053
Seriously what's the difference between neovim and vim for the end user? As far as I know the only difference is that its a clean rewrite of vim and is easier for developers to maintain it.
>>
>>62907488
I don't know about you, but Vim often had random lag for me. NeoVim didn't.
>>
>>62907488
This could result in faster development, therefore more features for the end user. Of course only if user actually use it to incentivize development, so it's a vicious cycle kinda
>>
>>62907488
NeoVim runs on less platforms to make it easier for you which OS to choose.
>>
>>62907587
>NeoVim runs on less platforms
What?
>>
>>62907606
Where's the NeoVim AmigaOS port?
Or OS/2? Or OpenVMS?
>>
>>62907652
Is there any reason why it wouldn't compile fine on those platforms though?
>>
>>62907671
Yes, NeoVIM ripped out the support for more obscure platforms.

Well, OpenVMS port might not be too hard since it has POSIX compatibility.
>>
File: onlyvilliansemacs.png (257 KB, 772x619)
257 KB
257 KB PNG
What are you favorite vim tricks?
>>
>>62874223
Wow, my thread lives?? Longest life of one I ever made :^).

So, did we all agree?
>>
>>62909214
vim is worth knowing
but emacs is the truth
>>
>>62909214
I agree, anon.
>>62909237
Emacs is worth knowing but vim is the truth
>>
>>62909305
emacs is a superset of vim. some IDEs may have lackluster vim emulation modes, but emacs's implementation is flawless.
>>
>>62874223
>Why are you using anything else? Learn Vim, and I promise you, you will never go back to sublime text.


> Quoting: http://4chan-science.wikia.com/wiki/Computer_Science_and_Engineering
> Contrary to the popular belief, learning to use a 1970s style terminal text editor like vim/emacs is completely unnecessary and unhelpful.
>>
>>62909581
>4chan-science.wikia.com
the hell is this
>>
And its this idiotic discussion again
>>
>>62909709
>Well, the important thing is you've found a way to feel superior to both
>>
>>62909581
>quoting my personal website:
>'contrary to popular belief, taking it in the ass from a trap is not gay'
>>
File: 1503381570508.png (374 KB, 550x912)
374 KB
374 KB PNG
do you guys use hjkl or jkl;? i personally find the ergonomics of jkl; considerably better, which is the default for i3 as well
>>
>>62910532
C-b C-n C-p C-f
>>
>>62910532
jkl; would probably be better for my typing but im too lazy to relearn those keys, so i just stick with the stock hjkl




Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.