From baba751dab060e43933846bc8d539f53a5c92de7 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Wed, 23 Dec 2015 11:21:43 +0000 Subject: [PATCH] Correct subcommand usage. Clarify changing project usage --- README.md | 23 ++++++++++++++--------- doc/youcompleteme.txt | 25 ++++++++++++++++--------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 5ef7ce79..d1025098 100644 --- a/README.md +++ b/README.md @@ -795,10 +795,15 @@ Alternatively, as described in the [Tern documentation][tern-docs], a global `.tern-config` file may be used. Currently, multiple Tern servers, are not supported. To switch to a different -project, change Vim's working directory (`:cd /path/to/new/project`), open a -JavaScript file (or set filetype to JavaScript) and restart the Tern server -using YCM completer subcommands `:YcmCompleter StopServer` and -`:YcmCompleter StartServer`. +JavaScript project, you can do one of the following: + +- start a new instance of Vim from the new project's directory, or +- change Vim's working directory (`:cd /path/to/new/project`) and restart the + `ycmd` server (`:YcmRestartServer`) +- change Vim's working directory (`:cd /path/to/new/project`), open a JavaScript + file (or set filetype to JavaScript) and restart the Tern server using YCM + completer subcommands `:YcmCompleter StopServer` and `:YcmCompleter + StartServer`. #### Tips and tricks @@ -1171,9 +1176,9 @@ auto x = &s; // invoking on x or auto returns "auto"; std::cout << *x; // invoking on x returns "const char ** => const char **" ``` -NOTE: Causes reparsing of the current translation unit. +NOTE: Causes re-parsing of the current translation unit. -Supported in filetypes: `c, cpp, objc, objcpp, typescript` +Supported in filetypes: `c, cpp, objc, objcpp, typescript, javascript` ### The `GetParent` subcommand @@ -1204,7 +1209,7 @@ For global declarations, the semantic parent is the translation unit. NOTE: Causes re-parsing of the current translation unit. -Supported in filetypes: `c, cpp, objc, objcpp, typescript, javascript` +Supported in filetypes: `c, cpp, objc, objcpp` ### The `FixIt` subcommand @@ -1258,14 +1263,14 @@ javascript` Starts the semantic-engine-as-localhost-server for those semantic engines that work as separate servers that YCM talks to. -Supported in filetypes: `cs, javascript` +Supported in filetypes: `cs, javascript, go` ### The `StopServer` subcommand Stops the semantic-engine-as-localhost-server for those semantic engines that work as separate servers that YCM talks to. -Supported in filetypes: `cs, javascript` +Supported in filetypes: `cs, javascript, go` ### The `RestartServer` subcommand diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index d23d8e7e..7771101a 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -1004,10 +1004,17 @@ Alternatively, as described in the Tern documentation [34], a global '.tern- config' file may be used. Currently, multiple Tern servers, are not supported. To switch to a different -project, change Vim's working directory (':cd /path/to/new/project'), open a -JavaScript file (or set filetype to JavaScript) and restart the Tern server -using YCM completer subcommands ':YcmCompleter StopServer' and ':YcmCompleter -StartServer'. +JavaScript project, you can do one of the following: + +- start a new instance of Vim from the new project's directory, or + +- change Vim's working directory (':cd /path/to/new/project') and restart the + 'ycmd' server (|:YcmRestartServer|) + +- change Vim's working directory (':cd /path/to/new/project'), open a + JavaScript file (or set filetype to JavaScript) and restart the Tern server + using YCM completer subcommands ':YcmCompleter StopServer' and + ':YcmCompleter StartServer'. ------------------------------------------------------------------------------- *youcompleteme-tips-tricks* @@ -1400,9 +1407,9 @@ For example: // invoking on s returns "const char *" std::cout << *x; // invoking on x returns "const char ** => const char **" < -NOTE: Causes reparsing of the current translation unit. +NOTE: Causes re-parsing of the current translation unit. -Supported in filetypes: 'c, cpp, objc, objcpp, typescript' +Supported in filetypes: 'c, cpp, objc, objcpp, typescript, javascript' ------------------------------------------------------------------------------- The *GetParent* subcommand @@ -1432,7 +1439,7 @@ For global declarations, the semantic parent is the translation unit. NOTE: Causes re-parsing of the current translation unit. -Supported in filetypes: 'c, cpp, objc, objcpp, typescript, javascript' +Supported in filetypes: 'c, cpp, objc, objcpp' ------------------------------------------------------------------------------- The *FixIt* subcommand @@ -1490,7 +1497,7 @@ The *StartServer* subcommand Starts the semantic-engine-as-localhost-server for those semantic engines that work as separate servers that YCM talks to. -Supported in filetypes: 'cs, javascript' +Supported in filetypes: 'cs, javascript, go' ------------------------------------------------------------------------------- The *StopServer* subcommand @@ -1498,7 +1505,7 @@ The *StopServer* subcommand Stops the semantic-engine-as-localhost-server for those semantic engines that work as separate servers that YCM talks to. -Supported in filetypes: 'cs, javascript' +Supported in filetypes: 'cs, javascript, go' ------------------------------------------------------------------------------- The *RestartServer* subcommand