Ye Lin Aung
Ye Lin Aung

Reputation: 11459

Running external programs as Vim Editor command

I know I can run the external programs like ls, cat with ! . I've been searching around how to create shortcuts to run all these programs as editor commands.

For example, instead of !ls, I would like to create :lsf . Is there any way to do in Vim ?

Upvotes: 1

Views: 186

Answers (1)

Uku Loskit
Uku Loskit

Reputation: 42040

You can use this:

cnoremap lsf !ls

Upvotes: 3

Related Questions