[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Can vim be still a productive editor when using default key mapping?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 108
Thread images: 9

File: vim_logo.png (29KB, 650x650px) Image search: [Google]
vim_logo.png
29KB, 650x650px
Can vim be still a productive editor when using default key mapping?
Example: using default Esc for switching between modes
>>
>>58601865
Yes, but I don't understand why you just don't change mappings if you're unhappy with them?
>>
>>58601865
When vi was written the Esc key was about where the tab is now.

Using the top-left Esc key isn't very ergonomic, considering Esc is one of the keys you'll press the most. It's also not the away vi was meant to be used, it almost completely defeats the purpose of vi which is having your hands on the home row at all times.

Swap Esc and Caps Lock. You don't need Caps Lock.
>>
>>58601913
>considering Esc is one of the keys you'll press the most
That's not true, the whole idea behind the modal design is that you don't frequently change mode.

But I agree that the current placement of the escape is bad, which is why I have remapped caps lock.
>>
>>58601872
It's not that I'm unhappy with them, but if I knew for sure that you can get the same productivity benefits of vim without custom mappings, I wouldn't spend much time hacking with them. Thereby the only way to know this is to directly ask if there's someone who does use vim productively even without editing config that much.
>>
>>58601913
Thanks for the tip!
>>
>>58601950
One of the advantages of vim is that it's avaiable everyhwere, espcially on machines you only access remotely, so customizing it beyond recognition would be couter-productive.
>>
>>58601950
The only "custom hacking" Vim needs is the Esc one. All of the rest are very sane defaults you should stick to. Most of the hacking you'll do on Vim is not related to the keybindings but rather style, macros, plug-ins, etc.
>>
>>58601981
That's a fair point.
>>
>>58601981
shrewd
>>
>>58601950
>if I knew for sure that you can get the same productivity benefits of vim without custom mappings, I wouldn't spend much time hacking with them.
I don't know about you, but I've used vim for 10 years and I'm going to use vim for all conceivable future, so yes, it is an advantage to spend time configuring it.

>>58601981
You can put your configuration files on github and all you need to do is git clone on any system.
>>
>>58601987
What do you personally use to replace the Esc key?
>>
>>58602006
it's the only reason you should learn Vim
it's everywhere and can be run without X

that's why poeple arguing for emacs and sublime are beside the point
>>
>>58602013
>git clone on any system.
you don't always have writing permissions bruh.
>>
>>58602024
>emacs
>need X
You know that you can invoke emacs with the flag that's literally called "no x" right?

Do yourself a favour and type "emacs -nx" into the command line now and spare yourself for future embarrassments.
>>
>>58601865
>Can vim be still a productive editor when using default key mapping?
>Example: using default Esc for switching between modes
If you're on a machine where you don't have access to your rc files, use ctrl-c instead of esc
If you're on your own machine, don't use ctrl-c, remap capslock or use any of the solutions found here:
http://vim.wikia.com/wiki/Avoid_the_escape_key
>>
>>58602035
>no write
Then why are you using vim at all and not something like less? Default vim config on any system is completely arbitrary (like Ubuntu having syntax highlighting on as default while Debian does not), and many systems don't even have vim but vi.
>>
>>58601930
>the whole idea behind the modal design is that you don't frequently change mode
What you wrote is not just false, it's literally the opposite of what is true.
>>
>>58602013
Using your own configuration will require you to be allowed to change it. Which might be a hassle when you share the account with coworkers.

>>58602064
Debians default vim doesn't even support syntax highlighting. (Since it's vim.tiny)
>>
> unironically not using Visual Studio

get on with the times linuxfags
>>
>>58602018
Caps Lock since it's useless. It's coincidentally the most comfortable place for the Esc key to be in.

It's weird when you try it out and you'll keep going for the top-left Esc key, that's why I disabled it so I was forced to use the Esc.

Now I use Esc on Caps Lock on every system for everything, not only on Vim. Once you get used to it you'll realize what a good position that the key is in, which is otherwise completely wasted if you let it be Caps Lock (useless).
>>
>>58602052
Thank you.
>>
>>58602064
time wasted on cloning and cleaning, instead of using vim out of the box.
>>
>>58602085
>Using your own configuration will require you to be allowed to change it.
On what earth would you not be allowed to change it?

>Which might be a hassle when you share the account with coworkers.
Then either make separate users or don't change it? I don't see the problem, do you frequently log onto systems where you share the user and do extensive amount of programming?

>Debians default vim doesn't even support syntax highlighting. (Since it's vim.tiny)
Exactly my point. You should not rely on the default configuration anywhere.
>>
>>58602038
emacs -nx is a gimped emacs
vim without x is still vim.

and vim still wins the popularity contest.
>>
>>58602103
>vim out of the box
See >>58602085 and >>58602064
>>
File: vim.png (320KB, 1979x1346px) Image search: [Google]
vim.png
320KB, 1979x1346px
I've been using Vim for 3 months now. Switching modes is second nature by now and I don't even think about switching to normal. It's just second nature.
>>
>>58602127
>gimped emacs
What the fuck are you on about? The only difference is that nx doesn't launch a fucking basic x window with a xterm session.
>>
File: out.gif (132KB, 1489x801px) Image search: [Google]
out.gif
132KB, 1489x801px
>>58602038
>>
>>58602121
>do you frequently log onto systems where you share the user
yes
>and do extensive amount of programming?
No, but even small edits are annoying when you're used to your own config and suddenly have to use the default one.
>>
File: boo.jpg (31KB, 293x361px) Image search: [Google]
boo.jpg
31KB, 293x361px
>>58602093
I use Visual Studio with a Vim plugin, what now?
>>
>>58602170

Does it even have code suggestions?
>>
>>58602148
Sorry, it's nw as in no window. I'm a vim guy.
>>
>>58602155
>yes
Why? That's a massive security risk.

>No, but even small edits are annoying when you're used to your own config and suddenly have to use the default one.
>default one
Are you even reading my posts?

There is no "default" configuration. Even the same fucking distro change their default configuration all the time. So unless your workstation by chance happens to have the same default config as the computer you're logging on to, it doesn't make any sense to avoid custom configurations.

Hell, why even use vim at all if you're not going to customize it?
>>
>>58602052
>>58601865
Ctrl-[ might be better since Ctrl-c doesn't replace abbreviations.
>>
>>58602216
I don't see how that is a security risk


>There is no "default" configuration.
Even if there are different default configurations for each and every distro, none of them will include things like remapped keys. And shit like syntax-highlighting won't get in the way of muscle-memory.
>>
>>58602277
>I don't see how that is a security risk
Someone gets a hold of the password (with N different users, there are N potential people who might do a fuckup) and now he has root access to that system and can lock all the other users out. Brilliant.

>Even if there are different default configurations for each and every distro, none of them will include things like remapped keys
So?

>And shit like syntax-highlighting won't get in the way of muscle-memory.
No, but auto completion, macros for block commenting and code navigation etc all do.

Honestly, if you use vim for more than 3 months and haven't already configured plugins to turn it into a full-fledged IDE, you probably shouldn't be having a programming job.
>>
>>58601865
>Esc
Use ctrl c instead
To save the file just ZZ instead of :w enter :q enter
>>
>>58602305
If someone comes in our office with a gun threatening us to give him the password being locked out of the system won't be our biggest worry.
>>
>>58602369
That's usually not what happens though. Usually you don't even notice that someone unauthorized have logged in to your system at all until it's too late.

Like when hackers rooted kernel.org and it wasn't detected until 6 months later and people had to literally manually go over git commit hashes for the kernel for at least 6 months to verify that they hadn't fucked it up.
>>
>>58602399
It's pretty hard to log unnoticed into systems not accesible from the Internet.
>>
>>58602443
>It's pretty hard to log unnoticed into systems not accesible from the Internet.
Not really, the same employee that fucked up might as well also have fucked up regarding his own workstation (which I bet is accessible from the internet).

Anyway, this discussion is really besides the point.
>>
>>58602466
>(which I bet is accessible from the internet)
Why would anybody do that?
>>
>>58602076
Not that anon, but if you are switching modes a lot then you have no idea how to use vi. insert mode is the least powerful mode and you should stay out of it as much as you can in order to use the powerful features of vi (ie the advanced features of "normal mode") I don't see how you couldn't understand that with "normal" mode being called "normal".
>>
>>58602517
To be able to work from home or access stuff remotely, but it's becoming increasingly obvious to me that you've never worked in a real office.

>inb4 you think I'm not taking VPNs and firewalls into consideration
I do
>>
Give me 5 good reasons why I should use vim over ed?
>>
>>58602583
You shouldn't.

Ed is the standard editor.
>>
>>58602141
but you can't run your cool IDE features without X
>>
>>58602709
Yeah, you can.
>>
>>58602734
but it would look ugly hence the "gimped"
>>
>>58602758
Just set your terminal emulator font to a nice font?
>>
>>58602548
>access stuff remotely
Not allowed at my workplace.
>>
>>58602789
>be obsessed with security and not allowing remote access using VPN like a sensible employer
>everyone shares the same user account and password out of convenience

This is why humans are the weakest link in any security issue
>>
>>58602258
Unless you live in the 90% of the world where ctrl-[ is cumbersome at best. Besides, if you don't have an rc file, where would the abbreviations come from?
>>
>>58602845
>90% of the world
what?
>>
>>58601913
i mean, if you've got baby hands, sure

ive been using vim both on my phone and laptop/computers, with default keybindings, and i go fairly quickly
>>
https://www.youtube.com/watch?v=XA2WjJbmmoM
https://www.youtube.com/watch?v=aHm36-na4-4
>>
>>58604368
>ive been using vim on my phone
ok keep it up, kid
>>
If I want to to try it. Where to start considering i never used two state editor?

At work im forced to use windiws, should i go for gvim?

Im not only talking about learning shortcuts, but also read about plugins, changing syntax highlightning, multiple windows, project tree etc.

I tried it once or twice on my xubuntu but all i got was black screen with no idea where to start.
>>
>>58605013
Do the vimtutor and learn how to use the help files, then just practice. Gvim is probably a good idea if you're running windows. Don't bother with plugins, changing syntax highlighting (provided it works at all), multiple windows etc right now. You can learn all that in the future once you know how to use the editor.
>>
yes, it already the most productive text editor by default.

swapping esc and capslock just makes it better.
>>
>>58604447
>that star wars plugin
>the audience doesn't react much
>you can hear the presenter breathing into his mic

jesus christ this is cringe central. not sure I can continue this video
>>
>>58605497
lol skip to the last 5min so you can get his github for the plug ins
>>
You can't do that in vim!
https://www.youtube.com/watch?v=D1sXuHnf_lo
>>
>>58602777
Trips win
>>
File: epic2.webm (312KB, 720x1280px) Image search: [Google]
epic2.webm
312KB, 720x1280px
>>58604483
hee ho
>>
>>58601913
This
>>
>>58601872
One of the biggest advantages of vi/vim is that it's available on any unix box. If you get used to different mappings then you won't be able to easily use vi/vim on a different machine.
>>
>>58605156
Well for now my work is more about traversing hundrets of source files and reading than typing so it would be really usefull.
So far i'm using atom, but i didn't learn it yet so i can go with vim as well.

Ill take your advice though, and go by baby steps.
>>
>>58601930
>That's not true, the whole idea behind the modal design is that you don't frequently change mode.
I thought you were supposed to change mode all the time, like a truck driver who shifts gear, tabs once to go into neutral and once to go into gear.
The same way all vim users tabs esc for neutral and i for insert.
But they do it so fast, it is still faster to type stuff this way because the size of the editor is small ish.
>>
>>58601913
I capitalize letters with caps lock instead of shift though, but I still need shift for stuff like %{} etc etc.
>>
>>58605868
fellow truck driver spotted
>>
>>58605868
You could use right ctrl and press it with your palm
>>
File: boom.jpg (11KB, 250x213px) Image search: [Google]
boom.jpg
11KB, 250x213px
YOU LITERALLY NEVER HAVE TO PRESS ESC. PRESS ALT (WITH YOUR LEFT HAND THUMB FAGGOT) + THE KEY YOU WISH TO USE IN NORMAL MODE. IT WILL TAKE YOU OUT OF NORMAL MODE AND PERFORM THE KEY PRESS!!!!
>>
>>58606518
holy shit I just improved my productivity again
>>
>>58601913
Is there a way to swap Caps with esc in Vim only?

Due to my language, I need caps to write certain letters.
>>
>>58606518
So to understand, if I'm in import mode, pressing Alt+V takes me to visual mode? That'd be it.
>>
>>58608971
>Due to my language, I need caps to write certain letters.
What language would that be?
>>
>>58609012
ja
>>
>>58601865
Yes. Vim has pretty much all you need out of the box and the keybindings are great by default.
My config is also only a few lines and I only have 5 new keybindings in it.
>>
>>58609051
Shitpost
>>
File: 1468101225943.jpg (31KB, 388x532px) Image search: [Google]
1468101225943.jpg
31KB, 388x532px
>>58609354
Kek!
>>
I'm fine with esc. But what I never use is the autsmo HJKL bindings. I just use the arrow keys.
>>
>>58601865
I only remapping I use it the double j to escape, it's a lot better than having to press esc.
>>
>>58609051
Czech. You have the letters š ěéí etc. up there on the letters. If you wanna start a sentence, it's easiest to Caps, write the letter and unCaps.
>>
>>58606518
And then you basically have Emacs? Good job, retard.

If you hate modal editing, which is the entire point of vi, then there's no reason to use these hacks, just switch to Emacs keybindings altogether.
>>
>>58608971
Yes, what system are you on? On Linux/Unix you can do it trivially with Xmodmap and setting up an alias in bash.
>>
>>58606473
Not that guy, but I've got my Mod key on that row and $mod+Ctrl+J opens my work suite. I do agree that the Caps for one letter is dumb unless you can't use shift to uppercase it.
>>
>>58613666
I'm on debian.

If the Alt stuff works, I won't need to use it, but still, I know xmodmap, but why aliases? What would that do?
>>
>>58613790
So instead of launching Vim you launch Vim with your custom Xmodmap, and whenever you close it, it switches back to the default mod map with Esc and Caps Lock in their default places.

You can still of course just swap Esc and Caps Lock at all times. Even if you use Caps Lock (I have the same problem as you), it's still in my experience that you'll use Esc much more often than CL so you would benefit from the switch anyway for minimal effort (the 3 or 4 days you'll need to get used to it).
>>
>>58601865
>Example: using default Esc for switching between modes
inoremap jk <Esc>
>>
File: gmk_vimcaps_render_cropped.png (421KB, 1000x511px) Image search: [Google]
gmk_vimcaps_render_cropped.png
421KB, 1000x511px
>>
>>58613587
Sounds like you guys have a shitty keyboard layout then
ŠĚÉÍ
>>
>>58601950

If you call changing a setting "hacking" then maybe Vim isn't for you. . .
>>
>>58605806
>One of the biggest advantages of vi/vim is that it's available on any unix box.
The biggest advantage of vim is that it is highly configurable.

>If you get used to different mappings then you won't be able to easily use vi/vim on a different machine.
Just install your own configuration files.
>>
>>58602094
I replaced it with jj and not caps lock, and I got used to it in a few minutes. Probably because I haven't been using vim for that long at that time and because the esc key is really small on my keyboard.
>>
imap jj <esc>
Otherwise, default mappings are fine.
>>
>>58602035
The .vimrc is in ~, when don't you have write permissions there? But anyway, the bigger problem is that vim isn't installed by default on many systems, like debian for example, and you often don't have root privileges to install shit.
>>
File: algorithm.gif (8KB, 283x222px) Image search: [Google]
algorithm.gif
8KB, 283x222px
>>58614340
What do you call this algorithm?
>>
>>58618162
Looks like A*
>>
>>58602518

This.
Vi is about "speaking a text meta language".

Beginners are mostly in insert mode and think about "wow, that's a cool short cut to do this and that".

Then many people start to use visual mode and macros more.

And then you realize how powerful all those ex commands (that stuff starting with ":") really are or how you can play with the "!" stuff..

Eventually you will just "hover" over the text and be meta as fuck. I still have a long way to go there, but I've seen some shit, mang. Dark magic (i.e. the @-command), you have no idea what vim is capable of..

>vi +'/foo/d|wq!' ~/.ssh/known_hosts
>use Perl/AWK/sed macro, example here is removing an entry from SSH known hosts file non-interactively while re-imaging a set of servers

And this is only Vi, not even the final form.
People really have no idea what Vi is capable of.
>>
>>58618162

Should be the Bellmann-Ford algorithm.

>>58618192

A* has some sort of estimation function
>>
>>58604368
how do you use it on a phone? ive tried but the android keyboard lacks keys like escape
>>
>>58618678
Hacker's keyboard, there might be others too
>>
>>58619087
oh, thanks
>>
>>58618192
>>58618593
No, it's Dtra's algorithm
>>
>>58618572
>vi +'/foo/d|wq!' ~/.ssh/known_hosts

why not just use sed? bloody hell lad what a pointless example
>>
>>58621967
Dijkstra's algorithm
Thread posts: 108
Thread images: 9


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.