Text editor customization

Xavier Hughes
Xavier Hughes

What plugins and extensions do you use for vim or emacs? What settings do you enable in the configs? Have you found any underrated/underused default utilities? Please share. Not a editor war thread.

All urls found in this thread:
https://www.youtube.com/watch?v=JWD1Fpdd4Pc
https://www.youtube.com/watch?v=aHm36-na4-4
https://github.com/junegunn/vim-plug),
http://vimcasts.org/blog/2013/01/oil-and-vinegar-split-windows-and-project-drawer/
http://howivim.com/2016/damian-conway/
http://howivim.com/2016/damian-conway/
https://www.youtube.com/watch?v=ZpInOI4o2LY
https://www.youtube.com/watch?v=7ycpEUQAnp4
https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/
https://stackoverflow.com/questions/11489428/how-to-make-vim-paste-from-and-copy-to-systems-clipboard#11489440
Kayden Lopez
Kayden Lopez

don't use :set rnu it's slow as fuck

Jayden Parker
Jayden Parker

cuck editor

Nathan Scott
Nathan Scott

Ugandan niggerware
lol pass, i'd rather use kosher emacs

Levi Robinson
Levi Robinson

Pretty soon, your IQ will drop and the word "editor" will be replaced with "cuck" in your brain too. Cuck cuck, cuck cuck squawk. Chicken chicken chicken.

Jayden Edwards
Jayden Edwards

Evil is one way vimcucks can redeem themselves. The other is suicide.

https://www.youtube.com/watch?v=JWD1Fpdd4Pc

Matthew White
Matthew White

Viper is pretty good as well tbh. Not exacly a Vim clone though.

Juan Ross
Juan Ross

For emacs:
completion
irony, company
latex
auctex, obviously

And that's all. Emacs itself is already pretty complete and slow enough.

Tyler Evans
Tyler Evans

vim with no plugins and
set expandtab
set shiftwidth=2
set softtabstop=2
set noswapfile

Jaxon Roberts
Jaxon Roberts

Visual Studio CODE
>Atomic Dream
>gives the top half of the screen to Atom and bottom to Sublime
>written by a dude that works across my street in SF Bay
>CloudSafe.io
>stores everything in the cloud in real time, including repo, cursor position, undo history, fonts, and plugins.
>when I use another computer I can easily connect to CloudSafe and have all my plugins and current workspace open on a fresh install of Visual Studio CODE
>Xcode-sync
>seamlessly synchronizes the IDE with Xcode
>polylintify.io
>lints your code on every keystroke, saved me from over 500 bugs

Henry Butler
Henry Butler

Am I the only one who uses vim completely default?

Carter Johnson
Carter Johnson

kek, people will seriously reply to this

I'm using completely default vim right now, that's why I want to know about customizations.

Angel Hughes
Angel Hughes

There's a vim jedi on youtube Damian Conway, but gives talks on vi / vim productivity and macros. https://www.youtube.com/watch?v=aHm36-na4-4
I just rice a theme and use it raw if I don't want to use vi in a terminal while coding.
Nerd tree is popular.

Nicholas Hill
Nicholas Hill

I'm using completely default vim right now, that's why I want to know about customizations.
The worst thing you can do is ask for a list of useful plugins, install all of them, and then wonder what the fuck just happened. I have been there and it's a mess. The best thing is after you have been using Vim for a while and you find wanting something to go an search for a plugin that scratches that one itch.

That said, there are some generally useful plugins that I can recommend to most people:

Package manager
I use Neovim with vim-plug (https://github.com/junegunn/vim-plug), but other plugin managers work as well.

tpope/vim-fugitive
A Git wrapper, allows you to use Git commands from inside Vim
tpope/vim-eunuch
A Unix command wrapper, allows you to rename, move or remove files from within Vim. Very handy.
tpope/vim-commentary
Adds a command (gc) for commenting and uncommenting pieces of code in a lot of languages. Make a selection, press gc and it will all be commented or uncommented.
tpope/vim-characterize
If you Unicode you can press ga on top of a character and get information about that character. ga works without this plugin, but with the plugin the display is better.
Shougo/denite.nvim
This one is a bit hard to explain, basically it's an interface for other plugins that makes it possible to have some sort of filtering menu interface. One of the sources it comes with is an asynchronous fuzzy file finder, which is what I use most of the time.
Raimondi/delimitMate
Insert the matching parentheses and quotation marks automatically, the best one I have found.
SirVer/ultisnips
Snippets
scrooloose/nerdtree
A file drawer to the left side. It's great for exploring a project's code base, but you should not use it for opening files:
http://vimcasts.org/blog/2013/01/oil-and-vinegar-split-windows-and-project-drawer/
justinmk/vim-dirvish
A file system browser more in line with the above link
scrooloose/syntastic & neomake/neomake
Run linters automatically. I use neomake when possible because it runs asynchronously, i.e. without blocking the editor while the checker is running.

Adam Sullivan
Adam Sullivan

B-but I use Mousepad.

Josiah Sanders
Josiah Sanders

Underrated trips of truth

Luke Barnes
Luke Barnes

I can share some things for Emacs.
magit is an excellent git extension. It exposes git very well, and makes certain git features much more accessible than git itself makes them, even disregarding the Emacs integration.
undo-tree visualizes your entire undo history as a tree. Emacs already saves all your undos by default, and lets you access any previous state of your buffer, but the regular user interface pretty much consists of a single keybinding, which is horrible. undo-tree makes it pleasant.
window-number is a good way for switching between windows. Instead of the C-x o dance you press M-1, M-2, etcetera. That replaces the meta bindings for the prefix argument, but you can get those with C-1, C-2, etcetera or C-x <number> anyway, so that's fine.
Leuven is a very nice built-in theme. It's especiall good with org-mode.
multiple-cursors is an easier way of doing most of the things you'd do with keyboard macros.
wc-mode is good if you need to track word count.
ag is an interface to the command line tool of the same name. Gives you an overview of all the matches in a directory tree of a term, with links you can follow. Simple, well-executed.
whitespace is a built-in package for handling whitespace problems. Its whitespace-cleanup command is especially useful, it automatically corrects trailing whitespace and useless mixing of tabs and spaces. Give it a keybinding and you can clean up those messes in half a second each for the rest of your life.
Lean to use the built-in package manager, if you haven't already, and add MELPA and Marmalade to it. Makes it trivial to find and install just about anything you need, including all of the above.

Connor Wright
Connor Wright

Not exactly Emacs configuration, but remapping Caps Lock as Control ""and Escape"" is a must-have.

Samuel Anderson
Samuel Anderson

For a while I used xcape to turn it into an escape key, but it ended up interfering more than it helped. Caps Lock as a Control key is great, though.

Zachary Perry
Zachary Perry

http://howivim.com/2016/damian-conway/
I don’t use a colour scheme at all, and very rarely use syntax highlighting. I find multicoloured code very distracting…almost inducing sensory overload. It much easier to cope with just my standard yellow-on-black terminal window.

Which is great. But the down side is that you cannot stand colored code anymore, it looks disturbing and gay as fuck.
I hope E-ink monitors will be here soon and syntax highlighting will die .

Ethan Torres
Ethan Torres

Nano just werks

Benjamin Baker
Benjamin Baker

space-vim and you're language/project Ctags.

Jonathan Rogers
Jonathan Rogers

http://howivim.com/2016/damian-conway/
"ayy
"A3yy
"Ay}
v/end<CR>'Ay
"Ayy
etc.

Camden Parker
Camden Parker

How do you get around project management in Vim?
I tried, but Vim's incompetency in this area got me started with Emacs.

Nicholas Long
Nicholas Long

Is there some way to make Emacs use different fonts for text and programming?
Monospace makes reading super slow.

Ian Miller
Ian Miller

variable-pitch-mode activates a proportional font for the current buffer. I have it bound to C-c v, but you could add a hook for it. For example, if you want to automatically enable it for org-mode, put this in your init file:
(add-hook 'org-mode-hook 'variable-pitch-mode)

Cooper Carter
Cooper Carter

Thanks user that will help.

Camden Ortiz
Camden Ortiz

You know how folders work, right?

Carter Moore
Carter Moore

use comfy grayscale
Preview: base16-grayscale-dark/light
chriskempson.github.io/base16/

Carter Bennett
Carter Bennett

swift
stopped reading there

Hudson Young
Hudson Young

neogavim swag 3.0 noscope edition whatever
refer to

Dominic Young
Dominic Young

Your mistake, trip friend.
The guy is a tremendous shitlord.
This is a kind of insanity he does.
https://www.youtube.com/watch?v=ZpInOI4o2LY

Jaxon Allen
Jaxon Allen

space-vim
vim copying spacemacs
Holy shit this is cool. And it seems like a Japanese guy made it/

Gabriel Fisher
Gabriel Fisher

up next: Stevan Little - Perl - The Detroit of Scripting Languages
https://www.youtube.com/watch?v=7ycpEUQAnp4
triggered

Isaiah Murphy
Isaiah Murphy

I don't get the hype between Space{macs,vim}, from what I see it's {Emacs,Vim} with a shitton of plugins and configs thrown onto them. It's taking an already complex system and adding even more complexity on top of it. The time spent on learning all features could just as well be used to make your own customizations according to your own needs instead of fighting someone else's choices.

Eli Adams
Eli Adams

It's actually the opposite. A bunch of presets for packages with a UI that is all about ease of discovery.
There's almost nothing to learn other than press Space.

Justin Parker
Justin Parker

I've been using vim for a few years, mostly with NERDTree and split windows. I've gotten fairly used to it.
Now, I've decided to start using i3 a few months ago. This doesn't fit well with vim's splits and especially not NERDTree. Are any other people using i3 with vim? How do you work with it? Do you use vim or i3 itself to manage the splits? Do you use an external/other file manager/project explorer? Are there any fancy ways to have vim open splits in new windows?

Charles Russell
Charles Russell

I personally find it easier to let i3 handle the splits. I never liked splitting within Vim. If Xorg isn't available I use Tmux for splitting.
I'm not saying the way Vim does splitting is bad, I just prefer to not use it when any other option is available.

Dylan Fisher
Dylan Fisher

this. split with i3 and just forget vim ever had the feature.

Charles Price
Charles Price

Well, I guess I could get that far by myself, but do you guys really cd into the project directory and run vim for every new split you make? Or do you use some fancy "open new terminal in the current terminal's cwd"? Or do you use some file manager like ranger?
Tbh, I find NERDTree (or any project explorer, for that matter) too useful to just go and drop it. It bothers me that there simply is no proper alternative that works well with i3. That said, I could go with something like netrw if there was a way to have a shortcut to open a new i3 split with it.

Mason Cooper
Mason Cooper

There are apparently ways to do it depending on what terminal you use (seems to work best with urxvt) https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/ but I'm a lazy nigger and use lilyterm and haven't found anything that works with that so I just navigate to the directory like a luddite each time.

Dominic Ramirez
Dominic Ramirez

Yeah, I've looked for this before, but all the available solutions fall into these categories:
1. Save the cwd somewhere (either a file, variable, or urxvt seems to have fancy stuff for it), every time you change directory (either by hooking cd, hijacking PS1, or some fancy hook in your shell)
2. Save the cwd in the window's title, have i3 read that through a shitty patch.
3. Look up the PID of the current window, recurse to it's deepest child, get that cwd.

The first two solutions are shitty hacks, using things that shouldn't be used for this purpose, have a lot of weird corner-cases, and simply won't work as well for obvious reasons.
The latter would seem like the best solution to me, and I would use it, if I wasn't using urxvtd, which completely breaks it, since it'll only ever get the cwd of the shell in the terminal with the lowest PID.

I'm a lazy nigger and use lilyterm and haven't found anything that works with that so I just navigate to the directory like a luddite each time
I really don't want to resort to that. When projects span more than 3 files, some kind of file manager is a must-have.
The best solution I can see right now is calling "urxvtc -e vim <file>" for every file I want to open. Either from the shell or some kind of file manager like ranger or vifm. That said, a solution for vim itself would be the best. Or if someone has any example of such a setup, that'd be nice.

Jose Rogers
Jose Rogers

How do you yank and put between different files if you have them opened in different vim instances?

Xavier Brooks
Xavier Brooks

Use the system's clipboard.
Ensure vim --version has '+clipboard' and add this to your vimrc:
set clipboard=unnamed
set clipboard+=unnamedplus

This'll also allow you to copy and paste easily from other programs as well. See this for more info: https://stackoverflow.com/questions/11489428/how-to-make-vim-paste-from-and-copy-to-systems-clipboard#11489440

Disable AdBlock to view this page

Disable AdBlock to view this page