strip filename from full path in small vim

29 views
Skip to first unread message

Bee

unread,
Sep 28, 2016, 12:45:05 PM9/28/16
to vim_use
In a 'normal' version of vim

:lcd %:h

will change to the directory of the current file by stripping the filename from the full path.

But in a 'small' vim '%:h' does not exist and '%' refers to the full file path.

Is there a way in 'small' vim to strip the filename from the path?

Andy Wokula

unread,
Sep 28, 2016, 1:38:48 PM9/28/16
to vim...@googlegroups.com
Try
:lcd %/..

--
Andy

Bee

unread,
Sep 28, 2016, 2:03:39 PM9/28/16
to vim_use, anw...@yahoo.de
testing with vim.tiny on lubuntu 16.04

:lcd %/..
E472: Command failed

Reply all
Reply to author
Forward
0 new messages