Vim, reddit

How do I use CTRL-^ with PowerShell on windows -> ssh to linux machines -> vim ? 2019-02-11 16:05:32

When I am using PowerShell on windows 10, and I ssh to a linux machine, and open multiple files in vim, CTRL-^ has no effect. CTRL-^ works if I ssh to this machine from a mac with iterm2, so this might be a PowerShell question more than a vim question, but this has been troubling me for a while, so I am hoping someone here has some guidance on this.

submitted by /u/sccrstud92
[link] [comments]

Read more

Mapping sequence of ctrl-* 2019-02-11 14:54:25

I've currently doing a switch from PhpStorm to (neo)vim. I would like to prefix some mappings with an initial <ctrl-p> like in Visual Studio and Visual Code - something like "ctrl-k, m".

Currently I've got:

nmap <c-p><c-u> :call phpactor#UseAdd()<CR>

Idea behind this: Everything phpactor related should just start with <ctrl-p>.

But that doesn't seem to work. I will just moved to the top of the file. Maybe this isn't even possible?

submitted by /u/Asrijaal
[link] [comments]

Read more

Something really strange regarding key mappings 2019-02-11 10:23:30

I'm fiddling with some key mappings and I encountered something that makes no sense. Hopefully someone here can shed some light on the problem since google wasn't much help.

I'm trying to set a key binding to resize horizontally. However, this results in nothing happening in vim :(

nnoremap <M-L> <C-W>> nnoremap <M-H> <C-W><lt> 

I know the target of the map is right because this works

nnoremap > <C-W>> nnoremap <lt> <C-W><lt> 

And I know the key binding is valid because this works

nnoremap <M-L> <C-W>- nnoremap <M-H> <C-W>+ 

This makes no sense though. If both the key-binding and what the binding is mapped to work with different pairings, why can't they work together?

submitted by /u/lobabob
[link] [comments]

Read more

gf for lua 2019-02-11 05:13:05

Hi, how can i use gf (goto file) with lua require like this: local foo = require("")

If the cursor is in foo or modules.


submitted by /u/someonemandev
[link] [comments]

Read more

My custom Vim Zippo lighter 2019-02-11 05:10:31

submitted by /u/leamanc
[link] [comments]

Read more

Am I the only one who prefers J and K being swapped? 2019-02-11 02:22:44

I was talking to a non-gaming friend of mine who has been using Vim for a long time and he thinks J is natural for going down because "the J looks like it points down".

On the flip side, I'm quite new to Vim but have played many hundreds of hours of video games over the years where WSAD was primarily used for movement where W is up / forward and S is down / backwards.

I'm wondering if any other gamers look at HJKL and expect J to be up while K goes down. When I see WSAD in my head, I internally process it as AWSD if it's forced to 1 line which maps to HKJL.

If I switch HJKL to HKJL, even without much Vim practice at all I feel like I'm at about 85% efficiency vs the arrow keys, but with HJKL it feels closer to 30%. It's a huge difference.

Does anyone else feel the same, or struggled with that until they eventually got used to HJKL after potentially months?

submitted by /u/nickjj_
[link] [comments]

Read more