Problems with grep used from Vim
Hi, when I'm trying to do such search
`:grep! --directories=recurse ./path/to/dir1 ./path/to/dir2 -e "class A|struct B"`
I'm getting:
`/bin/bash: -c: line 0: unexpected EOF while looking for matching \`"'`
`/bin/bash: -c: line 1: syntax error: unexpected end of file`
What am I doing wrong?
https://redd.it/17g3bb9
@r_vim
When doing :windo diffthis is there a way to remove all shared lines and keep the ones that are missing/extra?
When comparing results I need to compare sorted lines of numbers.
I put the wanted result in one buffer, and my result in the other.
When doing `:windo diffthis` some lines will be missing (say 20 in 30k).
I want only those lines that are missing in the other buffers as they are the special cases that need further investigation.
Is there a way to do that?
https://redd.it/17g3ree
@r_vim
A nice keybinding for navigating through buffers in a sweet way.
A while ago I read about a guy who posted this sweet feature: :b
and hit tab
to display all the current buffers.
I found it lovely and I decided to add a keybinding to it. However, it was a bit more complex than expected, but now it's done and to prevent others to go through my same issues, I decided to share my solution (at this point I may uninstall BufSelect
plugin):
set wildcharm=<tab>
nnoremap <leader>b :b <tab>
I hope that you like it! :)
https://redd.it/17fz9kh
@r_vim
What’s the VIM Pareto for an IT professional?
20% of the VIM commands(motions, operators, text objects etc.) that are sufficient to accomplish 80% of editing tasks as a developer(or an IT professional in general).
https://redd.it/17ffelc
@r_vim
what do people mean when they say "i use vim so that i don't get stuck when i am on a server"?
tbh i am a really noob coder, and i like vim (i use nvim kickstart but still), and i see some people saying something like "you can't use vscode on a server" so by server they mean an OS that is only a terminal with no gui?
and if they are on this "server" to fix a problem do they import their configs every time or just use vanila vim?
https://redd.it/17fd9lo
@r_vim
Quick question about vim
When I press Tab in a non vim editor it immediately indents or adds 4 spaces traditionally.
Since I started using vim, i have to go into i sert mode and then press tab to add indent or 4 spaces. My question is how do you add tab(ident pr 4 spaces)at the current cursor pointer in normal mode?
https://redd.it/17er4bt
@r_vim
Help understanding the after directory in neovim
I've been using emacs for a hot minute and now I've just heard about this thing called lazy and thought I'd atleast figure out how to configure stuff with it and since i'm restarting my nvim config i thought I'd figure out how to organize my neovim config and all of the resources I've been using state that the after/
directory loads automatically but it just doesn't for me and i don't understand what exactly i am doing wrong.
my current file tree is looks like this
/home/nightwing/.config/nvim
├── init.lua
├── init.lua.bak
├── lazy-lock.json
└── lua
└── zeitgeist
├── after
│ └── plugin
│ └── telescope.lua
├── init.lua
├── keymaps.lua
├── options.lua
├── pluginlist.lua
└── plugins.lua
I tried going through the :h after-directory
but i have no idea how this helps:
after-directory 7, 8, 9, 10. In after/ subdirectories of 1, 2, 3 and 4, with reverse ordering. This is for preferences to overrule or add to the distributed defaults or system-wide settings (rarely needed).
​
https://redd.it/17eg2sy
@r_vim
Pure Foolery: The naughty playground of the web
Random but: I came across this new site called Pure Foolery ( http://purefoolery.com ). It's a pretty funny site - it's sexy with a fun twist. They have challenges with different scenarios you respond to . My fav challenge so far is the "Santa's helpers turned into strippers" . lol Also, you can share your random thoughts. It's free to join btw. Just thought I'd share
https://redd.it/17e8ds6
@r_vim
Vim and pair programming
I’m a new Vim user (just turned on the IDE plugin for the motions about 3 months ago) so I’m still pretty clunky. I know after the steep learning curve it will pay off, not to mention ward off wrist pain.
I was recently reassigned to another project at work where the whole team operates by “mob programming” on everything, all day, all the time. So folks get to see me stumble over myself in real time. It particularly infuriates the tech lead when she is navigating and I’m driving. She has all but stopped short of demanding I turn it off.
So pair/collaborative/mob programmers - what do you do especially while still learning the motions? Suck it up and be willing to look dumb in front of a group (hahaha - is there an equivalent of “student driver” bumper stickers for this?), turn it off when grouped with a Vim hater? Something else I haven’t thought of?
https://redd.it/17dsc21
@r_vim
Custom html script tag and attribute highlight for hyperscript
I start using \_hyperscript recently and I pretty like it. But it has one little problem: NO SYNTAX HIGHLIGHT IN VIM both on <script type="text/hyperscrpt">
and on _
attribute.
So how can one create and custom highlight for the script
tag and the _
attribute in VIM for html filetype?
!No highlight for script and \_
https://redd.it/17dm0c0
@r_vim
Use vim full time
I want to switch to vim full time but I am currently just stuck on vscode with vim bindings. I can’t for the life of me figure out how to get used to not having a file tree. What are some things yall do when working with multiple files and such?
https://redd.it/17daljt
@r_vim
what do you think of emacs viper-mode?
viper mode emulates vim environment
i have not personally tried it but i feel that it might be the best to use environment as it would give us best thing in both worlds
​
i just want to ask why should i use vim if i can have viper mode in emacs?
i might be wrong to ask this because i have not personally tried it but i'm a long user of vim
​
​
these are something i wonder while watching my teacher code in emacs
i love using vim but when i look at the speed at which (pro)emacs users code i feel significantly slower than them
https://redd.it/17ccypm
@r_vim
How do I search through a directory of files for keywords efficiently?
Hey, I’d appreciate some advice. I have been using VIM bindings for a year in vscode but every time I try setup neovim I get frustrated because I cant search for keywords quickly enough across files. What should I look into and learn?
My workflow with vscode is as follows, I open a root directory, call it “./git”, and within this there are many repos that I jump back and forth and I look for keywords in vscode with cmd+search tools. I have also set files to not search through, like .yml, .md etc. It works okay, but I have to use a mouse to move between search hits which is a drain on milliseconds.
How do I setup a similar workflow in vim? I need to be faster.
https://redd.it/17ceeak
@r_vim
can i use vim keybinding in emacs?
i want to always run neovim in emacs?
this is because vim motions are amazing and i love the vim as text editor better than what emacs feels
but just the fact that emacs has so many extentions makes it amazing
what would be issues i might face while running neovim in emacs and using things like emacs macros to do most stuff the emacs way?
https://redd.it/17cd0yg
@r_vim
ALE - Deno project running tsserver
Hi everybody.
I'm having a problem with ALE and I think it is not enough to open an issue.
So I decided to ask here if anyone knows about it.
On opening a Deno project it gives me errors related to Deno-specific code.
PS: I'm using Vim, not NeoVIM.
My :ALEInfo
:
Current Filetype: typescript
Available Linters: ['cspell', 'deno', 'eslint', 'standard', 'tslint', 'tsserver', 'typecheck', 'xo']
Enabled Linters: ['cspell', 'deno', 'eslint', 'standard', 'tslint', 'tsserver', 'typecheck', 'xo']
Ignored Linters: []
Suggested Fixers:
'deno' - Fix TypeScript using deno fmt.
'dprint' - Pluggable and configurable code formatting platform
'eslint' - Apply eslint --fix to a file.
'prettier' - Apply prettier to a file.
...
How to set <Ctrl> + / as key binding?
If that's at all possible?
I've just installed Vim Commentary by tpop and I want to comment out lines user <CTRL> + / like the IDEs I am used to. How do I set that up?
I tried the obvious stuff like
nnoremape <C-/> :Commentary<cr>
but that doesn't work. I googled and most of my googling directed me to the conclusion that this is not possible. So is it really? And do you happen to know a work-around?
https://redd.it/17g5b8c
@r_vim
Vim 9 has a gray background
I prefer black background in terminal, including when using Vim. I find myself on a host that has Vim 9. When I launch Vim, it's using a gray background. See this screenshot.
I tried playing with various colour schemes, but no matter what I choose, the background remains always gray.
FWIW, I'm using the same vimrc that I use on all other Vim 8.x installations. How can I change its background colour back to black.
https://redd.it/17fz4xm
@r_vim
Can 4090 run Vim?
guys I'm curious, I bought a 3070 and I'm wondering if it is able to run Vim, however, can you guys tell me if I should buy a 4090?
Heard some rumors that Vim makes 4090 overheat and can cause serious damage to property
https://redd.it/17ftai4
@r_vim
IntelliJ Auto Import in Vim
Hello,
One thing I am sorely missing in vim is just typing "Tuple" and an automatic menu to select what I mean and then put "from typing import Tuple" near the top level imports.
And to do so with my code, 3rd party code and builtins.
This is the best feature of Pycharm I never could replicate in vim even with hours of YCM and other plugins.
Does this feature work for anyone?
Otherwise vim is awesome of course and I love the scriptability of it.
https://redd.it/17fee5d
@r_vim
Does Helix, Kakoune, Vis, moe or any other, the likes of them, flatten the learning curve a little bit?
I am tired of the steep learning curve of vim. I wanted to get good with the key-bindings and plugins because many servers running linux have vi/m. I have enough work as such and I don't want to keep digging Vim manuals. Let me get back to vim after I try something which has compassion for new users.
https://redd.it/17fazdl
@r_vim
Esc key behavior on Windows vs Ubuntu
Hi people !
In ubuntu's CLI (using WSL but that's not important), whenever I need to get out from insert mode or visual mode or anything, I press Escape once and it just works. It has always worked so ridiculously well that I never suspected it could mess up one day.
​
Until the day I installed vim on windows, set PATH variable to C:/Program Files (x86)/Vim/vim1.0/, opened powershell, and wrote vim main.cpp
to make a test.
The escape key just does weird things. It seems to act like an Alt key, but when I press it 4 or 5 times it finally escapes the insert mode but writes many weird character in the bottom where you usually write :w for example (yeah i don't know what's that section name).
I've looked in google and found many suggestions such as ctrl+j or remaping jj or whatever. I don't want all these, I just need my old sweet Esc key to work as I'm used to.
Anyone can help me? *sob*
https://redd.it/17epukn
@r_vim
Vim Clutch
Do you have one? If so, is it worth having? Where did you buy it from? I was thinking about getting one but all I can see on the interwebs are projects build from raspberry pis etc., I'm looking for something prebuilt as I'm not a hardware guy ;)
https://redd.it/17eff69
@r_vim
Why would i use vim?
Hello everyone
seen lot of people talking about it for years, never used it
why would i use it instead of a regular IDE like VS code?
some people mentioned it speedup things..to what extent? how much time can it really save if you are an expert?
https://redd.it/17e27rg
@r_vim
Full vim for ios/macos dev?
As per title, has anyone successfully done it? and mind to share your experience and setup so far?
for context: i used to be ios dev for about 4 years then i decided i wanna use vim full time so i move to be backend engineer (good ice breaker / 'whats interesting about you' story!). its been 5 years since!
during my time, use of vim is limited to use custom vim xcode plugin, but at some time apple kill the legacy plugin system (so we need to do some workaround, details are fuzzy now). from my understanding xcode now support vim keybinding natively though
https://redd.it/17dp53i
@r_vim
Why doesn't yy move cursor to beginning of line?
As far as I can tell, most yank operations move the cursor to the beginning of the yanked region. This includes, for example, yiw
, yap
, etc.
But this is not true for yy
or y<count>j
or y<count>k
. Why is that?
It's not a problem for me, per se, but just wondering what the reason(ing) is.
https://redd.it/17dbo7p
@r_vim
What's the difference between use vimeo and neovim
I'm a junior developer that can't use VScode in his computer because it's very weak. I wanna learn vim/neovim but I like to now these answer, before I do something
https://redd.it/17ctltb
@r_vim
Obsidian confirming whether a user knows how to use vim on enabling vim mode
​
https://preview.redd.it/9x08dc8o7evb1.png?width=560&format=png&auto=webp&s=8d7ae010911eef616f4304c4419a09ece3531867
https://redd.it/17cgsx5
@r_vim
YouTube Music has Vim Keybindings
I was today years old when I found out I can navigate my YouTube Music playlists with standard Vim keybindings.
h = Seek backwards 10 seconds
j = Next song
k = Previous song
l = Seek forward 10 seconds
It's actually pretty amazing the effect that Vi has had on the world, whether the general public realizes it.
https://redd.it/17cdcqq
@r_vim
VIM newbie here. My new workspace requires VIM, but doesn't let me modify it, it's compiled without a clipboard, and I have to copy-paste to/from VIM a LOT to do my basic job.
So, I'm working my way into a new job. I never touched VIM before this year (gasp, I know) and didn't start getting decent at it til about a month ago. I can get around files decently, use substitutions, and a few other things, and slowly things are getting faster.
My new workplace REQUIRES VIM - as in the VMs we use for work don't have any other text editors loaded. We also are not allowed to modify configs (security reasons). It's regular VIM compiled without xterm clipboard support and also has mouse turned off (mouse= ). I CAN turn the mouse back on, but clipboard is a lost cause - and besides, insisting on mouse seems like it's missing the point.
Now here's the kicker: my job involves a LOT of copy-paste. I have to keep my work terminal and VIM terminal separate (no tabs, splitting, or multiplexing) - again for "security purposes". Like I can go through a few hundred commands in a couple of hours. If I had clipboard this would be super duper easy but as is... I find myself constantly having to take my hand off keyboard to shift-highlight shift-ctrl-c then mouse to my term and shift-ctrl-v.
I'm coming to terms with it but the added mental load of having to constantly shift gears from keyboard to k+m actually becomes draining after a while and I start making technical errors (dropping the wrong command in a term and having to start an hour of work all over again)
Anyone have any advice? No quitting isn't an option for financial and legal reasons. Plus I like the job, I'm just frustrated with this randomly convoluted work method that management insists on. I've been working on it for a few months but I feel like I'm missing something here.
https://redd.it/17bys3z
@r_vim
Other than Vim, what other editors do you dabble in?
I am a developer at one of the large cloud companies and a good chunk of my work is in Java. While I use Vim almost exclusively when I work in other languages (perl, ruby, python, bash) I find that Java development using a dedicated IDE is just a much better experience.
Curious to see about others experiences; what other editors/IDEs do you play around with and when do you do it?
https://redd.it/17blqes
@r_vim