iggredible / learn-vim Goto Github PK
View Code? Open in Web Editor NEWLearning Vim and Vimscript doesn't have to be hard. This is the guide that you're looking for 📖
License: Other
Learning Vim and Vimscript doesn't have to be hard. This is the guide that you're looking for 📖
License: Other
Hello Igor.
I ask you to remove the link to Spanish Updated version. Since that repo is a copy of my translation, but without respect my work with translation and the license (CC-by-sa-nc).
That is not a fork of mine. He has copied the files and create his own repo. And I have spend many hours doing translation, reviews, etc that not appears in that repo.
Greetings
First, thank you for your guide, it is really amazing!
In order to try and give a little contribution, I want to report a small oversight happened here
If I am learning Vim correctly, "To change from your current location to the end of the current paragraph, say c}
", should become one of these:
}
d}
Edit: Indeed, this makes sense as long as we agree upon the meaning of "change": maybe I misunderstood what it means to change in this context. If that is the case, sorry for wasting your time
I think chapter about vim plugins can very helpful. For example introduce some powerful vim plugins and teach how install and config them, because these tools makes vim a cool IDE 😎
Some useful plugins are :
The global command :g/^$/,/./-1j
seems to be wrong since Vim >= 9.0 throws
E16: Invalid range: ,/./-1j
when I run this example given section Reduce Multiple Empty Lines to One Empty Line. Surprisingly the commands works nevertheless.
There must be another way to specify ranges in the cmd for :g.
A valid alternative to reduce multiple empty lines to only one empty line is
:g/^$/v/./j
Hey, Just created this issue to let you know that the book is coming up nicely so far. Thanks for the efforts, looking forward to all the chapters !
"simpversatile" appears in https://github.com/iggredible/Learn-Vim/blob/master/ch07_the_dot_command.md .
The dot command is the simpversatile command for automating single changes. In a later chapter, you will learn how to automate more complex actions with Vim macros. But first, let's learn about registers to store and retrieve text.
I searched it on Google and only got two results.
Did you mean to type "simple versatile"?
Hello.
in chapter 20, Viminfo section you can read:
the next time you open Vim you still that text stored in the register.
Reading that I found a bit weird... maybe missing a word after "still"... or maybe I'm wrong...
Greetings!
"Ch22", which is displayed in the Table of Contents. But in the first line inside the file ('ch22_vimrc.md`), it change to "ch21".
The same errors occured in ch23, ch24, ch25, ch26, ch27, ch28, ch29.
Thank you for your work! It's a really helpful guide and I learned a lot from it
https://github.com/iggredible/Learn-Vim/blob/master/ch13_the_global_command.md#advanced-sort
However, in the section above, it says that This command also follows the form :g/pattern1/,/pattern2/command
, but I can't find anything about this form from the doc
In my opinion, it should be illustrated like this:
:g
is the global command pattern./\[/
is the only pattern. It matches a literal left square bracket "[".+1,/\]/-1
is a range, it begins from the line below the current cursor position (current cursor is placed at [
), to the line above ]
. thus, if not abbreviated, it should be written as .+1,/\]/-1
.If I add a dot before +1, it works well, that's why I think this explanation makes more sense.
Hello.
In the chapter 00 you can read:
The :help command and Google are your best friends.
Well, many people out there (like me) have another best friends when we are talking about search engines. :)
Can that sentence change a bit to include not only just one brand?
Greetings
Hola, gracias por tomarte el trabajo en la edicion del documento, si te parece bien voy a tratar esta semana de traducir y pasarte el ch21_vimrc.md
Ya lo empece, pero no se como voy a estar de tiempos (estoy recien llegado de vacaciones y seguro algo me pasa)
Saludos! y perdon si este no es el medio.
Working (or having fun) in the spanish translation for your text about learn Vim in a smart way:
https://github.com/victorhck/learn-Vim-es
Translate, improve, fix... PR are wellcome!!
Thanks for your work!!
In 'ch8_registers.md' the numbered registers don't autoincrement with '.'
'1p' followed by '.' will insert two copies of register 1.
Hello,
I was trying to update the chinese version of "Learn-Vim". In the section "Pattern Matching" of ch12 (search_and_substitute), i found some words a bit confusing. i am not ture that if it's a error or my misunderstand.
In the line 342:
(\w+) (\w+)
is a group match.\w
is one of Vim's predefined ranges for a word character ([0-9A-Za-z_]
). The( )
surrounding it captures a word character match in a group. Notice the space between the two groupings.(\w+) (\w+)
captures two groups. The first group captures "one" and the second group captures "two".
The first group captures "one" and the second group captures "two".
Should it be changed to "In the first line, the first group captures "let", and the second group captures "one"?
Another doubt in the section “Advanced Sort” of ch13(the global command):
In the line 538 and 539:
:g/\[/
is the global command pattern./\[/+1
is the first pattern. It matches a literal left square bracket "[". The+1
refers to the line below it.
In the line 538, the character "/[/" which followed ":g", is repeatitive with line 539. Should it be changed to ":g
is the global command" ?
Hello!
I was translating Chap29 and I found:
For MVP, this command was good enough,
What does mean MVP in this context? (Maybe a silly question...)
Greetings
shall the 'last' and 'first' be first, last?
`< Go to the last place of the previous visual mode highlight
`> Go to the first place of the previous visual mode highlight
Thanks for your work, so far I'm really enjoying this guide!
At https://learnvim.irian.to/basics/buffers-windows-and-tabs I noticed the typo, that was fixed by #117 a good while ago, so it seems you still have an old version deployed there. Maybe you want to update your page to latest and greatest.
Hello, Igor!
I would like create a portuguese version of your work.
I read some old issues and appears that translations are happening in separated from this repository. Is that right?
So, in advance I cloned this repo and just started it.
But, to don't face the risk of start a work that other person already started I come here to know is that exists or I am free to do it.
Btw, if you want, you can link it with a WIP tag.
Aprenda-Vim
Hello.
I was translating ch25, section "And", and found a sentence a bit confusing:
Unlike "or", "and" will evaluate the subsequent expression after it reaches the first falsy expression. It will continue to evaluate the subsequent truthy expressions until the end or when it sees the first falsy expression.
Maybe it's me (so I'm not native english speaker) ?
If you find that text is right, just close this issue...
Hello!
translating the chapter 6, I found that you have changed the commands to capital letters. Let's pick up this section as example.
There you say:
Ctrl-H Delete one character
Ctrl-W Delete one word
Ctrl-U Delete the entire line
Since that in Vim, for example, it's not the same i or I for insert text, shouldn't be more appropriate this?
Ctrl-h Delete one character
Ctrl-w Delete one word
Ctrl-u Delete the entire line
just asking.
Greetings!
Hello!
In chapter 16 in this section I found the word milage
Don't know what does it mean. Not sure if its a typo or it's right.
Greetings.
Working in my translation of your guide I found an explanation of one command a bit confusing. I refer to the part you brake it down this comand:
Don't know if the text can be improved to gain clarity when reading the text...
If not, I should to think again how to translate the best way possible!! :)
Greetings!
Hello.
Translating the section Dictionary in chapter 27 I don't undertand what means when you say namespace. Don't know how to translate that word, because don't understand completly the second example...
Also in next section (Funcref) after the first example I can read
let MyFar = function("MyFunc")
Should be MyVar instead MyFar?
Thanks for your support
hello @iggredible, Thank for sharing. I am maintainer of @vim-china. And can we translate this into chinese? Just same as vim-golare_zh_cn did by us.
Hi dear,
I want transfer it to my native language.
But your licensed looks i cannot make any changes, including translation.
So i'm not sure if i can translate it
In addition, maybe you can add language management.
I think many people are willing to add the translation pr in your book(including me).
!}column -t -s "|"
/bin/bash: }column: command not found
shell returned 127
As a quick example, say you have a line like
test testing tester
:s/test/foo/g gives foo fooing fooer
:s/\zstest\zeing/foo gives test fooing tester
reference: https://www.reddit.com/r/vim/comments/ijy2gb/flygrep_grep_and_replace_on_the_fly_in_a_project/
Hello.
I was reading/translating the Clearing a register section in ch08 and I found texts a bit confusing, don't know if really are errors or maybe my english fails! (sure it's last option!)
First:
Technically, there is no need to clear any register because the next register you store under the same name will overwrite it.
Maybe register should be text ?
Second:
Another alternative is to run the command :call setreg('a', '') where "a is the register a.
Says where "a is register a, but where is the text "a in that sentence?
Please, if this is right, just close and ignore this issue!!
Greetings
hello, in Capturing a Phone Number
of ch12_search_and_substitute.md
, mixed of the magic syntax ( \v
) and escape special characters
/\d\{3\}-\d\{3\}-\d\{4\}
/\v\d{3}-\d{3}-\d{4}
This single line sets foldmethod to marker. I think this method is better than autocmd
method, because filetype checking is not needed, and it only affects 1 file(vimrc
), not affecting other vim files.
" vim:foldmethod=marker
Note: this line should be placed within 5 lines of the top or bottom of vimrc
file.
Reference:
I'm a newbie to Vim, when following the chapters I got stuck at chapter 4 when running the command !}column -t -s "|"
, my cursor was on "Id"
The error message I got is the following
[No write since last change]
zsh:1: command not found: }column
shell returned 127
My whole test file looks like
1 Id|Name|Cuteness
2 01|Puppy|Very
3 02|Kitten|Ok
4 03|Bunny|Ok
5
After googling a bit I found that :%!column -t -s "|"
works for me, but that's suppose to pipe the whole file to column instead of just a paragraph stated in chapter 4. Am I missing some setting in vimrc? Or something else?
Hello, have you consider add one chapter intro about LSP plugin, such as coc , sometimes they are very useful.
Even neovim now has built-in support for LSP directly.
https://github.com/neoclide/coc.nvim
Hello.
At the begining of chap02 it's mentioned a suggestion to add in vimrc file. And it's followed by a small explanation about how to do that.
Don't know if this still it's necesary, maybe this part was written before chap00 was created. Now in that very first chapter there's a small explanation about what vimrc is, so maybe the explanation in cha02 it's not necessary...
What do you think?
BTW: The spanish translation it's finished (I'm still doing proofreading, etc) and can be found, apart in GitHub repo, also in GitBook
Hello.
In ch13 in this section the syntax of example is:
:g/pattern/command
and later in the same chapter in other section the syntax add a curly brackets:
:g!/{pattern}/{command}
it's right, or should use the same syntax?
Greetings
I think it would be a nice addition to add vimdiff as a new chapter. This can be Ch. 22, the later chapters should be shifted of course.
I can prepare the chapter on the base of my blog post. https://enis.hashnode.dev/introduction-to-vim-diff
Chapter about vim runtime would be great.
My Favorite resource:
When directly navigating to this page through the sidebar, or by pressing next, you get to a blank page.
The links go to https://learnvim.irian.to/basics/command_line_mode, but the page lies at https://learnvim.irian.to/basics/command-line_mode
First of all, thanks for this amazing project.
It seems like no one is working for a Korean version yet.
I'd like to work on it if you wouldn't mind!
In ch03_searching_files.md:
For some reason, I both had to add the Plugs in .vimrc
and use the PlugInstall
command to install the plugins. Perhaps we could enrich the guide to mention that, what do you think?
Happy to make a PR :)
@richardanderson001 created a review titled:
Great resource for new Vim users
on repo-reviews.github.io to share their experience using Learn-Vim.
If you would like to help your super-users share their experiences using your repo, add a badge to your README.md.
We hope that sharing these experiences helps your users increase their productivity.
--
Please be kind,
I’m a human!
Under https://learnvim.irian.to/basics/compile#compiling-with-make , the C++ code has a double backslash. There should just be one backslash.
I think that you have not cover about the key in the guide... (I'm wrong)
Maybe can be added a section or something in some chapter about this setup?
Greetings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.