skwp/dotfiles — pull request #364 by lfilho (2013-06-16 19:15:37+00:00)
Title: Fixing Y behaviour

The line in `yadr-keymap.vim`:

```
"make Y consistent with C and D
nnoremap Y y$
```
Was actually not working because YankRing replaces on commands that yanks something.

So I did the change as suggest in yankring's doc:

```
When capital Y is pressed, the YankRing will execute 'Y' and capture the
output from Vim. But there are cases where you do not want the default
behaviour of Vim, since you have customized some of these maps.

In this case, I usually map Y to be |y$|, which makes it consistent with
the |D| and |C| operators. The way yankring_n_keys works does not allow
me to customize this behaviour. Since many people may like to customize
the behaviour of these maps the YankRing will check to see if a
function called YRRunAfterMaps() exists. If it does, it will call
this function after it has created the maps. So in my case, I created
the following function in my |vimrc|: >
function! YRRunAfterMaps()
nnoremap Y :YRYankCount 'y$'
endfunction
<
```