# Share some cool kakrc snippets

**URL:** <https://discuss.kakoune.com/t/share-some-cool-kakrc-snippets/30>\
**Category:** Archives\
**Created:** [September 13, 2018, 2:18pm UTC](https://discuss.kakoune.com/t/share-some-cool-kakrc-snippets/30 "2018-09-13T14:18:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![occivink](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/occivink/32/27_2.png) [@occivink](https://discuss.kakoune.com/u/occivink)\
**Post date:** [September 13, 2018, 2:18pm UTC](https://discuss.kakoune.com/t/share-some-cool-kakrc-snippets/30/1 "2018-09-13T14:18:21Z")

</div>

Because we all have these tricked-out `kakrc`s with hidden gems inside.

I’ll start with this one:

```
map global normal w <a-i>w #select word
map global normal <a-w> <a-i><a-w> #select WORD
map global normal W '"_s.<ret><a-i>w' #subselect words from current selection
map global normal <a-W> '"_s.<ret><a-i><a-w>' #subselect WORDS

```

which repurposes `w` into a word selection mapping.

My reasoning is that the difference between default `e` and `w` is too subtle to warrant having both mappings, and I was never able to tell which I need in which circumstances anyway. So now I only move by words using e and b, which are symmetrical anyway.  
I also think selecting the current word is an incredibly common thing to do, and it deserves a better mapping than the awkward `<a-i>w`

---

<div class="post-metadata">

**Author:** ![robertmeta](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/robertmeta/32/833_2.png) [@robertmeta](https://discuss.kakoune.com/u/robertmeta)\
**Post date:** [September 13, 2018, 4:18pm UTC](https://discuss.kakoune.com/t/share-some-cool-kakrc-snippets/30/2 "2018-09-13T16:18:23Z")

</div>

`map global object h 'c<gt>,<lt><ret>' -docstring "select in the (html) angle brackets"`

I use the above way more than I thought to select like `<C-i>h` when in like

`<foo>a long string I want to replace</foo>`

EDIT: I plan to add one that selected between whitespace, just haven’t decided what to map it to.

---

<div class="post-metadata">

**Author:** ![robertmeta](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/robertmeta/32/833_2.png) [@robertmeta](https://discuss.kakoune.com/u/robertmeta)\
**Post date:** [May 2, 2019, 12:17pm UTC](https://discuss.kakoune.com/t/share-some-cool-kakrc-snippets/30/3 "2019-05-02T12:17:26Z")

</div>

A post was split to a new topic: [Better word selections](https://discuss.kakoune.com/t/better-word-selections/510)
