pathutil

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Gvimrc = "gvimrc"

Gvimrc is the basename of gvimrc in ~/.vim

View Source
const ProfileGvimrc = "gvimrc.vim"

ProfileGvimrc is the basename of profile gvimrc.

View Source
const ProfileVimrc = "vimrc.vim"

ProfileVimrc is the basename of profile vimrc.

View Source
const Vimrc = "vimrc"

Vimrc is the basename of vimrc in ~/.vim

Variables

This section is empty.

Functions

func BuildInfoJSON

func BuildInfoJSON() string

BuildInfoJSON returns "(vim dir)/pack/volt/build-info.json".

func BundledPlugConf added in v0.1.0

func BundledPlugConf() string

BundledPlugConf returns "(vim dir)/pack/volt/start/system/plugin/bundled_plugconf.vim".

func ConfigTOML added in v0.2.3

func ConfigTOML() string

ConfigTOML returns fullpath of "$HOME/volt/config.toml".

func Exists

func Exists(path string) bool

Exists returns true if path exists, otherwise returns false. Existence is checked by os.Lstat().

func HomeDir

func HomeDir() string

HomeDir detects HOME path. If HOME environment variable is not set, use USERPROFILE environment variable instead.

func LockJSON

func LockJSON() string

LockJSON returns fullpath of "$HOME/volt/lock.json".

func LookUpGvimrc

func LookUpGvimrc() []string

LookUpGvimrc looks up gvimrc path from the following candidates:

Windows  : $HOME/_gvimrc
           (vim dir)/gvimrc
Otherwise: $HOME/.gvimrc
           (vim dir)/gvimrc

func LookUpVimrc

func LookUpVimrc() []string

LookUpVimrc looks up vimrc path from the following candidates:

Windows  : $HOME/_vimrc
           (vim dir)/vimrc
Otherwise: $HOME/.vimrc
           (vim dir)/vimrc

func RCDir added in v0.2.0

func RCDir(profileName string) string

RCDir returns fullpath of "$HOME/volt/rc/{profileName}"

func TempDir added in v0.3.0

func TempDir() string

TempDir returns fullpath of "$HOME/tmp".

func TrxDir added in v0.4.1

func TrxDir() string

TrxDir returns fullpath of "$HOME/volt/trx".

func VimDir

func VimDir() string

VimDir returns the following fullpath:

Windows: $HOME/vimfiles
Other: $HOME/.vim

func VimExecutable added in v0.2.0

func VimExecutable() (string, error)

VimExecutable detects vim executable path. If VOLT_VIM environment variable is set, use it. Otherwise look up "vim" binary from PATH.

func VimVoltDir

func VimVoltDir() string

VimVoltDir returns "(vim dir)/pack/volt".

func VimVoltOptDir added in v0.1.0

func VimVoltOptDir() string

VimVoltOptDir returns "(vim dir)/pack/volt/opt".

func VimVoltStartDir

func VimVoltStartDir() string

VimVoltStartDir returns "(vim dir)/pack/volt/start".

func VoltPath

func VoltPath() string

VoltPath returns fullpath of "$HOME/volt".

Types

type ReposPath added in v0.3.0

type ReposPath string

ReposPath is string of "{site}/{user}/{repos}"

func DecodeReposPath added in v0.3.0

func DecodeReposPath(name string) ReposPath

DecodeReposPath decodes name to repos path. name is directory name: ~/.vim/pack/volt/opt/{name}

func NormalizeRepos

func NormalizeRepos(rawReposPath string) (ReposPath, error)

NormalizeRepos normalizes name into the following forms into ReposPath: 1. user/name[.git] 2. github.com/user/name[.git] 3. [git|http|https]://github.com/user/name[.git][/]

func (ReposPath) CloneURL added in v0.3.3

func (path ReposPath) CloneURL() string

CloneURL returns string "https://{reposPath}".

func (ReposPath) EncodeToPlugDirName added in v0.3.3

func (path ReposPath) EncodeToPlugDirName() string

EncodeToPlugDirName encodes path to directory name. The directory name is: ~/.vim/pack/volt/opt/{name}

func (ReposPath) Equals added in v0.4.1

func (path ReposPath) Equals(p2 ReposPath) bool

Equals returns true if path and p2 are the same.

func (ReposPath) FullPath added in v0.3.3

func (path ReposPath) FullPath() string

FullPath returns fullpath of ReposPath.

func (ReposPath) Plugconf added in v0.3.3

func (path ReposPath) Plugconf() string

Plugconf returns fullpath of plugconf.

func (ReposPath) String added in v0.3.0

func (path ReposPath) String() string

type ReposPathList added in v0.3.0

type ReposPathList []ReposPath

ReposPathList is []ReposPath

func (ReposPathList) Contains added in v0.4.1

func (list ReposPathList) Contains(reposPath ReposPath) bool

Contains returns true if list contains reposPath.

func (ReposPathList) Find added in v0.4.1

func (list ReposPathList) Find(reposPath ReposPath) ReposPath

Find returns an non-empty element (path.String() != "") if list contains reposPath.

func (ReposPathList) Strings added in v0.3.0

func (list ReposPathList) Strings() []string

Strings returns []string values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL