サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
ドラクエ3
vimcasts.org
Learn Vim at your own pace with my self-study Core Vim Course. Learn more I’ve revised the second edition of Practical Vim, bringing it up to date with Vim 8. If you bought the ebook direct from Pragmatic Bookshelf, then you’ll receive the update for free. As Vim continues to evolve, I want to make sure that the advice in Practical Vim stays relevant. The introduction to the book has this to say “
In TextMate, you can jump forward and back between tabstops by pressing tab or shift-tab (hence the name tabstop!). You can make UltiSnips behave the same way by putting these lines in your .vimrc file: let g:UltiSnipsExpandTrigger="<tab>" let g:UltiSnipsJumpForwardTrigger="<tab>" let g:UltiSnipsJumpBackwardTrigger="<s-tab>" Look up :help UltiSnips-triggers for more details. UltiSnips can replace
The gn command (introduced in Vim 7.4) makes it easy to operate on regions of text that match the current search pattern. It’s especially useful when used with a regex that matches text regions of variable length. Here’s what Vim’s documentation has to say about the gn command (:help gn): Search forward for the last used search pattern, like with n, and start Visual mode to select the match. If th
Lots of Vim’s built-in Normal mode commands can be executed multiple times by prefixing them with a count. User-defined Normal mode mappings don’t usually handle counts the way we might like them to. We’ll explore a couple of techniques for making our custom mappings respond predictably to a count. Problem: make a mapping that handles counts Suppose that we wanted to create a mapping so that press
The dot command is my all-time favorite Vim trick: it tells Vim to repeat the last change. But the dot command tends not to work well with user-defined mappings. In this episode, we’ll use repeat.vim to set up a simple mapping so that it can be repeated using the dot command. The README for repeat.vim begins: If you’ve ever tried using the . command after a plugin map, you were likely disappointed
Learn Vim at your own pace with my self-study Core Vim Course. Learn more Moving your Vim cursor around using the arrow keys is a bad habit, and like many bad habits it’s a difficult one to break! Putting these lines into your vimrc can help: noremap <Up> <NOP> noremap <Down> <NOP> noremap <Left> <NOP> noremap <Right> <NOP> This snippet causes each of the arrow keys to execute no operation, or in
You could profile the load time for your vimrc file as follows: vim --cmd 'profile start vimrc.profile' --cmd 'profile! file ~/.vimrc' To profile a function in the vimrc file, you would have to call it. For example, if there was a function called Zzzz(), you could profile that function by running: vim --cmd 'profile start vimrc.profile' --cmd 'profile! file ~/.vimrc' -c 'call Zzzz()' Remember: the
When git branches are merged, there is always the chance of a conflict arising if a file was modified in both the target and merge branches. You can resolve merge conflicts using a combination of fugitive’s :Gdiff command, and Vim’s built in diffget and diffput. In this episode, we’ll find out how. This is the third in a five part series on fugitive.vim. :Gdiff on a conflicted file opens 3-way dif
Git provides tools for searching the contents of files, commit messages, and even whether text was added or removed by a commit. In this episode, we’ll see how fugitive’s Ggrep and Glog commands wrap this functionality up so that we can search the contents and history of a git repo from right inside of Vim. This is the last of our five part series on fugitive.vim.
With the fugitive plugin, you’re not limited to just working with files in your working tree. The :Gedit command allows you to open files in other branches, and to browse any git object, including tags, commits and trees. Plus, if your repository is hosted on github, you can easily bring up the webpage for any git object using the :Gbrowse command. This is the penultimate of a five part series on
Using the :Git command, you can run any arbitrary git command from inside Vim. I prefer to switch to the shell for anything that generates a log of output, such as git log for example. But commands that generate little or no output are fair game for running from inside Vim (:Git checkout -b experimental for example). At Vim’s command line, the % symbol has a special meaning: it expands to the full
The fugitive plugin provides an interactive status window, where you can easily stage and review your changes for the next commit. The :Gdiff command visualizes the changes made to a file, by comparing the working copy with the index. In this episode, we’ll learn how to stage hunks of changes to the index without using the git add --patch command. This is the second of a five part series on fugiti
There are times when you can improve the readability of your code by lining up the elements on neighbouring lines. In this episode, I demonstrate how this can be achieved using the Tabular plugin. In this episode, I introduce the Tabular.vim plugin, by Matt Wozniski, which makes it easy to align regions of text that match a pattern. Aligning assignments Before: one = 1 two = 2 three = 3 four = 4 R
Learn Vim at your own pace with my self-study Core Vim Course. Learn more Ever since learning about Vim’s text-objects I have wished that there was a way of selecting blocks in ruby code. Well, now there is. Today I am releasing a plugin that creates a custom text object for selecting ruby blocks. Merry Christmas! Usage In ruby, a block is always closed with the end keyword. Ruby blocks may be ope
Learn Vim at your own pace with my self-study Core Vim Course. Learn more I am very pleased to announce that the Pragmatic Bookshelf will be publishing my book on Vim. The working title is Practical Vim, and I hope to complete it by the spring of 2011. Here is a synopsis: For an open source project Vim’s documentation is impressive in scope, but there is still a considerable barrier between the no
If you use Vim on muliple machines, it can be difficult to keep your configuration files synchronized across them. One solution is to put your dotfiles under version control. In this episode, I demonstrate how to keep your vimrc and plugins synchronized using git submodules and the pathogen plugin. Keep your dotfiles in git The following instructions assume that your home directory contains a .vim
Recording your keystrokes as a macro can be a great timesaver, but you have to be careful that you use commands in such a way that they can be reused. In this episode, I construct a fairly complex macro to build a structural HTML document from markdown. The demonstration in this video uses a range of techniques to construct a macro that can be replayed reliably, including text objects, the surroun
If you work with ruby you will know that the interactive ruby shell, or ‘IRB’ for short, is a useful sketchpad for coding. But the command line interface of IRB can feel quite limiting in comparison with the power of your text editor. In this episode, I’m going to demonstrate how you can get the best of both worlds, by loading Vim from inside IRB. IRB is great for trying out one liners, but if you
This episode demonstrates how Vim’s native file browser can be used to explore and manipulate the file system. The video demonstrates some of the functionality of the netrw plugin, which is usually distributed with Vim. Note that if the NERD_tree is installed, then the functionality described in this episode won’t work for you. Exploring the filesystem The file explorer is just another Vim buffer,
Do you have trouble cleaning up with your text editor? Does it cut through the toughest grease, grime and syntax errors? Are you burning your hands on too many hotkeys? Try Vim - Extra whitening classic scourer. Vim gets the job done faster. Take short easy strokes for lemon fresh scripts. Fast, bold, Vim.
All Vimcasts episodes Vimcasts contains 52 articles and 76 free screencasts. Browse all content by category.
Yanking and pasting works seemlessly between Neovim’s regular buffers and terminal buffers. In this video, we’ll look at how the Normal mode paste command works in a terminal buffer, and we’ll create a mapping to help with pasting text directly from Terminal mode. Watch screencast
このページを最初にブックマークしてみませんか?
『Vimcasts - Free screencasts about the text editor Vim』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く