Navigation Menu

Skip to content

Commit

Permalink
Rename vintageousrc -> neovintageous #404
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardroche committed Mar 5, 2019
1 parent 407d8a0 commit 49ae596
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 54 deletions.
4 changes: 2 additions & 2 deletions Default.sublime-commands
Expand Up @@ -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"
}
]
2 changes: 1 addition & 1 deletion Main.sublime-menu
Expand Up @@ -9,7 +9,7 @@
"caption": "NeoVintageous",
"children": [
{
"caption": ".vintageousrc File",
"caption": ".neovintageousrc File",
"command": "neovintageous_open_my_rc_file"
},
{
Expand Down
16 changes: 14 additions & 2 deletions nv/rc.py
Expand Up @@ -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)

Expand All @@ -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:
Expand Down
35 changes: 35 additions & 0 deletions res/NeoVintageousrc.sublime-syntax
@@ -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
Expand Up @@ -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>
Expand Down
35 changes: 0 additions & 35 deletions res/Vintageousrc.sublime-syntax

This file was deleted.

19 changes: 10 additions & 9 deletions res/doc/neovintageous.txt
Expand Up @@ -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

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

Expand All @@ -101,16 +101,17 @@ https://github.com/NeoVintageous/ToggleNeoVintageous

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

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

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
Expand Down Expand Up @@ -178,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=,

Expand Down
@@ -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
Expand Down

0 comments on commit 49ae596

Please sign in to comment.