https://github.com/pchynoweth/vim-namespace-obj
A simple namespace text object for vim
https://github.com/pchynoweth/vim-namespace-obj
vim vim-plugins
Last synced: about 1 month ago
JSON representation
A simple namespace text object for vim
- Host: GitHub
- URL: https://github.com/pchynoweth/vim-namespace-obj
- Owner: pchynoweth
- License: lgpl-3.0
- Created: 2017-04-09T12:37:19.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-23T20:01:19.000Z (about 9 years ago)
- Last Synced: 2025-01-25T19:42:01.118Z (over 1 year ago)
- Topics: vim, vim-plugins
- Language: Vim script
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vim-namespace-obj
=================
[](https://travis-ci.org/pchynoweth/vim-namespace-obj)
Description
-----------
I wrote this plugin to fulfill a specific requirement I have to change or remove
namespace-like text objects from C++ files. By this I mean names separated by a
double colon ('::').
The motion should be fully repeatable using the '.' (dot) operator (requires vim >=8.0).
Usage
-----
By default this plugin will not create any key mappings. You can opt for the
default mappings by adding the following to your vimrc:
```vim
let g:vim_namespace_obj_map_keys = 1
```
The default mapping are:
* an - Select a namespace
* in - Select inner namespace
Alternatively you can create your own mappings as follows:
```vim
omap an SelectANamespace
omap in SelectInnerNamespace
vmap an SelectANamespace
vmap in SelectInnerNamespace
```
Installation
------------
If you're using [Vundle](https://github.com/VundleVim/Vundle.vim),
just add `Plugin 'pchynoweth/vim-namespace-obj'` to your .vimrc and run `:PluginInstall`.
If you're using [vim-plug](https://github.com/junegunn/vim-plug),
just add `Plug 'pchynoweth/vim-namespace-obj'` to your .vimrc and run `:PlugInstall`.
If you're using [pathogen](https://github.com/tpope/vim-pathogen),
add this repo to your bundle directory.
License
-------
This project is licensed under the LGPL v3 - see the [LICENSE](LICENSE) for more details.