{"id":3,"description":"vim - shortcut to access file path and directory","tags":["vim","keyboard","shortcuts","programming"],"contents":["`:Vexplore` to open the explorer at the directory of the current file in vertical window","`%` shorthand to get the current file name, path and extension.","`:echo expand('%')` - displays the relative path of the file. Apply modifiers on top of that get different fields","`echo expand('%:p')` - displays the absolute path of the file","`echo expand('%:t')` - displays just the name of the file","`echo expand('%:h')` - displays the directory name of the file","// This can also be applied in the shell commands executed from vim.","`!ls %:h` - runs `ls` command on the directory of the current file"]}
