mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-10-08 19:26:56 +02:00
Add Rafał Hajdacki to contributors list
This commit is contained in:
@@ -263,6 +263,10 @@ Contributors:
|
||||
[![icon][github]](https://github.com/jorgengranseth)
|
||||
|
||||
Jørgen Granseth
|
||||
* [![icon][mail]](mailto:rafal@hajdacki.com)
|
||||
[![icon][github]](https://github.com/hajdamak)
|
||||
|
||||
Rafał Hajdacki
|
||||
|
||||
If you are a contributor and your name is not listed here, feel free to
|
||||
contact the maintainers.
|
||||
|
@@ -16,6 +16,12 @@ It is important to distinguish EAP from traditional pre-release software.
|
||||
Please note that the quality of EAP versions may at times be way below even
|
||||
usual beta standards.
|
||||
|
||||
[To Be Released]
|
||||
--------------
|
||||
|
||||
*Features*
|
||||
* Support XDG settings standard ([VIM-664](https://youtrack.jetbrains.com/issue/VIM-664))
|
||||
|
||||
0.54, 2019-11-20
|
||||
--------------
|
||||
|
||||
|
@@ -127,6 +127,9 @@ will affect where IdeaVim looks for your .ideavimrc file. For example, if you
|
||||
have `-Duser.home=/my/alternate/home` then IdeaVim will source
|
||||
`/my/alternate/home/.ideavimrc` instead of `~/.ideavimrc`.
|
||||
|
||||
Alternatively, you can set up initialization commands using [XDG](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) standard.
|
||||
Put your settings to `$XDG_CONFIG_HOME$/ideavim/ideavimrc` file. [To Be Released]
|
||||
|
||||
|
||||
Emulated Vim Plugins
|
||||
--------------------
|
||||
|
@@ -29,6 +29,7 @@ import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -40,7 +41,7 @@ import java.util.regex.Pattern;
|
||||
public class VimScriptParser {
|
||||
public static final String VIMRC_FILE_NAME = "ideavimrc";
|
||||
public static final String[] HOME_VIMRC_PATHS = {"." + VIMRC_FILE_NAME, "_" + VIMRC_FILE_NAME};
|
||||
public static final String XDG_VIMRC_PATH = "ideavim/" + VIMRC_FILE_NAME;
|
||||
public static final String XDG_VIMRC_PATH = "ideavim" + File.pathSeparator + VIMRC_FILE_NAME;
|
||||
public static final int BUFSIZE = 4096;
|
||||
private static final Pattern EOL_SPLIT_PATTERN = Pattern.compile(" *(\r\n|\n)+ *");
|
||||
private static final Pattern DOUBLE_QUOTED_STRING = Pattern.compile("\"([^\"]*)\"");
|
||||
@@ -67,13 +68,15 @@ public class VimScriptParser {
|
||||
|
||||
// Check in XDG config directory
|
||||
final String xdgConfigHomeProperty = System.getenv("XDG_CONFIG_HOME");
|
||||
final File xdgConfig;
|
||||
File xdgConfig = null;
|
||||
if (xdgConfigHomeProperty == null || Objects.equals(xdgConfigHomeProperty, "")) {
|
||||
xdgConfig = new File(homeDirName, ".config/" + XDG_VIMRC_PATH);
|
||||
if (homeDirName != null) {
|
||||
xdgConfig = Paths.get(homeDirName, ".config", XDG_VIMRC_PATH).toFile();
|
||||
}
|
||||
} else {
|
||||
xdgConfig = new File(xdgConfigHomeProperty, XDG_VIMRC_PATH);
|
||||
}
|
||||
if (xdgConfig.exists()) {
|
||||
if (xdgConfig != null && xdgConfig.exists()) {
|
||||
return xdgConfig;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user