Make :f do the same thing as :find in Vim

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I want to make :f do the same thing as :find so if I type :f abc.txt, it should run :find abc.txt.



I tried to do something like cmap f find but that just make any f into find







share|improve this question











migrated from unix.stackexchange.com Jul 12 at 22:26


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.














  • Related posts: Is there a way to alias :w' to :w, to avoid creating files named '?, How to make command-line abbreviations that only trigger at begining of line, and vim change :x function to delete buffer instead of save & quit
    – Peter Rincker
    Jul 12 at 23:02















up vote
1
down vote

favorite












I want to make :f do the same thing as :find so if I type :f abc.txt, it should run :find abc.txt.



I tried to do something like cmap f find but that just make any f into find







share|improve this question











migrated from unix.stackexchange.com Jul 12 at 22:26


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.














  • Related posts: Is there a way to alias :w' to :w, to avoid creating files named '?, How to make command-line abbreviations that only trigger at begining of line, and vim change :x function to delete buffer instead of save & quit
    – Peter Rincker
    Jul 12 at 23:02













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I want to make :f do the same thing as :find so if I type :f abc.txt, it should run :find abc.txt.



I tried to do something like cmap f find but that just make any f into find







share|improve this question











I want to make :f do the same thing as :find so if I type :f abc.txt, it should run :find abc.txt.



I tried to do something like cmap f find but that just make any f into find









share|improve this question










share|improve this question




share|improve this question









asked Jul 12 at 18:48









usama8800

1133




1133




migrated from unix.stackexchange.com Jul 12 at 22:26


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.






migrated from unix.stackexchange.com Jul 12 at 22:26


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.













  • Related posts: Is there a way to alias :w' to :w, to avoid creating files named '?, How to make command-line abbreviations that only trigger at begining of line, and vim change :x function to delete buffer instead of save & quit
    – Peter Rincker
    Jul 12 at 23:02

















  • Related posts: Is there a way to alias :w' to :w, to avoid creating files named '?, How to make command-line abbreviations that only trigger at begining of line, and vim change :x function to delete buffer instead of save & quit
    – Peter Rincker
    Jul 12 at 23:02
















Related posts: Is there a way to alias :w' to :w, to avoid creating files named '?, How to make command-line abbreviations that only trigger at begining of line, and vim change :x function to delete buffer instead of save & quit
– Peter Rincker
Jul 12 at 23:02





Related posts: Is there a way to alias :w' to :w, to avoid creating files named '?, How to make command-line abbreviations that only trigger at begining of line, and vim change :x function to delete buffer instead of save & quit
– Peter Rincker
Jul 12 at 23:02











1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










try this maybe:



cabbrev f find





share|improve this answer





















  • Be careful. Try /f<cr>. I would recommend using an expression abbrevation and checking getcmdtype() == ":". See vim change :x function to delete buffer instead of save & quit
    – Peter Rincker
    Jul 12 at 23:05










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "599"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fvi.stackexchange.com%2fquestions%2f16736%2fmake-f-do-the-same-thing-as-find-in-vim%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










try this maybe:



cabbrev f find





share|improve this answer





















  • Be careful. Try /f<cr>. I would recommend using an expression abbrevation and checking getcmdtype() == ":". See vim change :x function to delete buffer instead of save & quit
    – Peter Rincker
    Jul 12 at 23:05














up vote
1
down vote



accepted










try this maybe:



cabbrev f find





share|improve this answer





















  • Be careful. Try /f<cr>. I would recommend using an expression abbrevation and checking getcmdtype() == ":". See vim change :x function to delete buffer instead of save & quit
    – Peter Rincker
    Jul 12 at 23:05












up vote
1
down vote



accepted







up vote
1
down vote



accepted






try this maybe:



cabbrev f find





share|improve this answer













try this maybe:



cabbrev f find






share|improve this answer













share|improve this answer



share|improve this answer











answered Jul 12 at 21:26







thrig


















  • Be careful. Try /f<cr>. I would recommend using an expression abbrevation and checking getcmdtype() == ":". See vim change :x function to delete buffer instead of save & quit
    – Peter Rincker
    Jul 12 at 23:05
















  • Be careful. Try /f<cr>. I would recommend using an expression abbrevation and checking getcmdtype() == ":". See vim change :x function to delete buffer instead of save & quit
    – Peter Rincker
    Jul 12 at 23:05















Be careful. Try /f<cr>. I would recommend using an expression abbrevation and checking getcmdtype() == ":". See vim change :x function to delete buffer instead of save & quit
– Peter Rincker
Jul 12 at 23:05




Be careful. Try /f<cr>. I would recommend using an expression abbrevation and checking getcmdtype() == ":". See vim change :x function to delete buffer instead of save & quit
– Peter Rincker
Jul 12 at 23:05












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fvi.stackexchange.com%2fquestions%2f16736%2fmake-f-do-the-same-thing-as-find-in-vim%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

The Forum (Inglewood, California)

Palaiologos