Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Mapping :Ags #26

Closed
patelsan opened this issue Jul 20, 2016 · 1 comment
Closed

[Question] Mapping :Ags #26

patelsan opened this issue Jul 20, 2016 · 1 comment

Comments

@patelsan
Copy link

Please excuse me for asking a basic question - I am relatively new to VIM.

How can I map ":Ags" to something easy to type command? Maybe just "//", so a search could be performed using "//SearchText"

@gabesoft
Copy link
Owner

gabesoft commented Jul 22, 2016

You can do it by using nnoremap or a similar command (do an :h nnoremap in vim to learn more). For example I have the following two lines in my .vimrc

nnoremap <Leader>a :Ags<Space>
nnoremap <Leader><Leader>a :AgsQuit<CR>

That maps :Ags to ,a and :AgsQuit to ,,a (my leader key is ,)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants