Skip to content
Permalink
Browse files

Rename vintageousrc -> neovintageous #404

  • Loading branch information...
gerardroche committed Feb 13, 2019
1 parent 9d77c0f commit 93f1633a9d0a05fc0e8ee47a6825df7e2982e4ae
@@ -5,11 +5,11 @@
"args": {"file": "${packages}/NeoVintageous/CHANGELOG.md"}
},
{
"caption": "NeoVintageous: Open My .vintageousrc File",
"caption": "NeoVintageous: Open My .neovintageousrc File",
"command": "neovintageous_open_my_rc_file"
},
{
"caption": "NeoVintageous: Reload My .vintageousrc File",
"caption": "NeoVintageous: Reload My .neovintageousrc File",
"command": "neovintageous_reload_my_rc_file"
}
]
@@ -9,7 +9,7 @@
"caption": "NeoVintageous",
"children": [
{
"caption": ".vintageousrc File",
"caption": ".neovintageousrc File",
"command": "neovintageous_open_my_rc_file"
},
{
@@ -29,19 +29,30 @@


def _file_name():
return '.vintageousrc'
return '.neovintageousrc'


def _file_path():
return os.path.join(sublime.packages_path(), 'User', _file_name())


# Backwards compatibility fix.
def _rename_deprecated_file_name():
old_file = os.path.join(sublime.packages_path(), 'User', '.vintageousrc')
if os.path.exists(old_file):
if os.path.exists(_file_path()):
return message('%s already exists', _file_name())

os.rename(old_file, _file_path())


def open(window):
_rename_deprecated_file_name()
file = _file_path()

if not os.path.exists(file):
with builtins.open(file, 'w') as f:
f.write('" Type :h vintageousrc for help.\n')
f.write('" Type :h neovintageousrc for help.\n')

window.open_file(file)

@@ -67,6 +78,7 @@ def _unload():

def _load():
try:
_rename_deprecated_file_name()
from NeoVintageous.nv.ex_cmds import do_ex_cmdline
window = sublime.active_window()
with builtins.open(_file_path(), 'r') as f:
@@ -0,0 +1,35 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: NeoVintageousrc (NeoVintageous)
file_extensions:
- .neovintageousrc
- .vintageousrc
scope: source.neovintageousrc
hidden: true
contexts:
main:

- match: "^\\s*\".*"
scope: comment.line.neovintageourc

- match: ^:?((n|o|s|v)?noremap)\b
scope: keyword.control.neovintageourc

- match: ^:?\b(n|o|s|v)?map.*
scope: invalid.neovintageourc

- match: (let) (map(?:local)?leader)(=).*
captures:
1: keyword.control.neovintageourc
2: variable.language.neovintageourc
3: keyword.operator.assignment.neovintageourc

- match: \<[A-Za-z0-9-]+\>
scope: storage.type.neovintageourc

- match: (?<!\\)\|
scope: invalid.neovintageourc

- match: ^.*$
scope: invalid.neovintageourc
@@ -2,9 +2,9 @@
<plist version="1.0">
<dict>
<key>name</key>
<string>Vintageousrc (NeoVintageous)</string>
<string>Neovintageousrc (NeoVintageous)</string>
<key>scope</key>
<string>source.vintageousrc</string>
<string>source.neovintageousrc</string>
<key>settings</key>
<dict>
<key>shellVariables</key>

This file was deleted.

Oops, something went wrong.
@@ -11,7 +11,7 @@ Neovintageous *neovintageous* *nv*
3. Opening a split window |nv-splits|
4. Command Palette |nv-command-palette|
5. Toggle |nv-toggle|
6. neovintageousrc |neovintageousrc|
6. neovintageousrc |nv-rc|
7. Multiple cursors |nv-multiple-cursors|
8. Plugins out-of-the-box |nv-plugins|
1.1 Abolish |nv-abolish|
@@ -89,8 +89,8 @@ CTRL-W v
COMMAND PALETTE *nv-command-palette*

NeoVintageous: Changelog
NeoVintageous: Open My .vintageousrc File
NeoVintageous: Reload My .vintageousrc File
NeoVintageous: Open My .neovintageousrc File
NeoVintageous: Reload My .neovintageousrc File

==============================================================================

@@ -101,15 +101,17 @@ https://github.com/NeoVintageous/ToggleNeoVintageous

==============================================================================

VINTAGEOUSRC *neovintageousrc*
NEOVINTAGEOUSRC *nv-rc*
*neovintageousrc*
*vintageousrc*

In Vim, a file that contains initialization commands is called a vintageousrc
file. The file is located at "Packages/User/.vintageousrc" and is read by during
startup. It can be edited and reloaded via the Command Palette commands:
In Vim, a file that contains initialization commands is called a
neovintageousrc file. The file is located at "Packages/User/.neovintageousrc"
and is read by during startup. It can be edited and reloaded via the Command
Palette commands:

* NeoVintageous: Open My .vintageousrc File
* NeoVintageous: Reload My .vintageousrc File
* NeoVintageous: Open My .neovintageousrc File
* NeoVintageous: Reload My .neovintageousrc File

The |mapleader| variable is supported. To define a mapping which uses the
"mapleader" variable, the special string "<leader>" can be used. It is
@@ -177,7 +179,7 @@ To enable the ability to toggle the side bar when the side bar has focus:
More examples: >

" The character " (the double quote mark) starts a comment
" Type :h vintageousrc for help.
" Type :h neovintageousrc for help.

let mapleader=,

@@ -1,11 +1,11 @@
" SYNTAX TEST "Packages/NeoVintageous/res/Vintageousrc.sublime-syntax"
" SYNTAX TEST "Packages/NeoVintageous/res/NeoVintageousrc.sublime-syntax"

" The character " (the double quote mark) starts a comment
" ^ source.vintageousrc
" ^ source.neovintageousrc
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line

let mapleader=,
" ^ source.vintageousrc
" ^ source.neovintageousrc
" ^ keyword.control
" ^^^^^^^^^ variable.language
" ^ keyword.operator.assignment

0 comments on commit 93f1633

Please sign in to comment.
You can’t perform that action at this time.