mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 02:54:31 +03:00
Rename auto commands file
This commit is contained in:
parent
f7d88cd007
commit
609af5aac1
@ -8,13 +8,13 @@
|
|||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
1929B40A751BDA2882D4FC94 /* NvimViewObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B22A0CAD417EC3790F02 /* NvimViewObjects.swift */; };
|
1929B40A751BDA2882D4FC94 /* NvimViewObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B22A0CAD417EC3790F02 /* NvimViewObjects.swift */; };
|
||||||
|
4B2016EE1FD45EED0038528A /* NvimAutoCommandEvent.generated.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B2016EC1FD45EED0038528A /* NvimAutoCommandEvent.generated.m */; };
|
||||||
|
4B2016EF1FD45EED0038528A /* NvimAutoCommandEvent.generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2016ED1FD45EED0038528A /* NvimAutoCommandEvent.generated.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
4B90F02D1FD2AFAE008A39E0 /* NvimUiBridgeProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90F00F1FD2AFAC008A39E0 /* NvimUiBridgeProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
4B90F02D1FD2AFAE008A39E0 /* NvimUiBridgeProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90F00F1FD2AFAC008A39E0 /* NvimUiBridgeProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
4B90F02E1FD2AFAE008A39E0 /* NvimView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0101FD2AFAC008A39E0 /* NvimView.swift */; };
|
4B90F02E1FD2AFAE008A39E0 /* NvimView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0101FD2AFAC008A39E0 /* NvimView.swift */; };
|
||||||
4B90F02F1FD2AFAE008A39E0 /* NvimView+Resize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0111FD2AFAC008A39E0 /* NvimView+Resize.swift */; };
|
4B90F02F1FD2AFAE008A39E0 /* NvimView+Resize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0111FD2AFAC008A39E0 /* NvimView+Resize.swift */; };
|
||||||
4B90F0301FD2AFAE008A39E0 /* KeyUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0121FD2AFAC008A39E0 /* KeyUtils.swift */; };
|
4B90F0301FD2AFAE008A39E0 /* KeyUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0121FD2AFAC008A39E0 /* KeyUtils.swift */; };
|
||||||
4B90F0311FD2AFAE008A39E0 /* NeoVimAutoCommandEvent.generated.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0131FD2AFAC008A39E0 /* NeoVimAutoCommandEvent.generated.m */; };
|
|
||||||
4B90F0321FD2AFAE008A39E0 /* NvimView+Dragging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0141FD2AFAC008A39E0 /* NvimView+Dragging.swift */; };
|
4B90F0321FD2AFAE008A39E0 /* NvimView+Dragging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0141FD2AFAC008A39E0 /* NvimView+Dragging.swift */; };
|
||||||
4B90F0331FD2AFAE008A39E0 /* NeoVimAutoCommandEvent.generated.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90F0151FD2AFAC008A39E0 /* NeoVimAutoCommandEvent.generated.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
4B90F0341FD2AFAE008A39E0 /* CocoaExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0161FD2AFAC008A39E0 /* CocoaExtensions.swift */; };
|
4B90F0341FD2AFAE008A39E0 /* CocoaExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0161FD2AFAC008A39E0 /* CocoaExtensions.swift */; };
|
||||||
4B90F0351FD2AFAE008A39E0 /* NvimView+Mouse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0171FD2AFAC008A39E0 /* NvimView+Mouse.swift */; };
|
4B90F0351FD2AFAE008A39E0 /* NvimView+Mouse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0171FD2AFAC008A39E0 /* NvimView+Mouse.swift */; };
|
||||||
4B90F0361FD2AFAE008A39E0 /* NvimViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0181FD2AFAC008A39E0 /* NvimViewDelegate.swift */; };
|
4B90F0361FD2AFAE008A39E0 /* NvimViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0181FD2AFAC008A39E0 /* NvimViewDelegate.swift */; };
|
||||||
@ -90,15 +90,15 @@
|
|||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
1929B22A0CAD417EC3790F02 /* NvimViewObjects.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NvimViewObjects.swift; sourceTree = "<group>"; };
|
1929B22A0CAD417EC3790F02 /* NvimViewObjects.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NvimViewObjects.swift; sourceTree = "<group>"; };
|
||||||
|
4B2016EC1FD45EED0038528A /* NvimAutoCommandEvent.generated.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NvimAutoCommandEvent.generated.m; sourceTree = "<group>"; };
|
||||||
|
4B2016ED1FD45EED0038528A /* NvimAutoCommandEvent.generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NvimAutoCommandEvent.generated.h; sourceTree = "<group>"; };
|
||||||
4B90F0041FD2AF59008A39E0 /* NvimView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NvimView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
4B90F0041FD2AF59008A39E0 /* NvimView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NvimView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
4B90F0081FD2AF59008A39E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
4B90F0081FD2AF59008A39E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
4B90F00F1FD2AFAC008A39E0 /* NvimUiBridgeProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NvimUiBridgeProtocol.h; sourceTree = "<group>"; };
|
4B90F00F1FD2AFAC008A39E0 /* NvimUiBridgeProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NvimUiBridgeProtocol.h; sourceTree = "<group>"; };
|
||||||
4B90F0101FD2AFAC008A39E0 /* NvimView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NvimView.swift; sourceTree = "<group>"; };
|
4B90F0101FD2AFAC008A39E0 /* NvimView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NvimView.swift; sourceTree = "<group>"; };
|
||||||
4B90F0111FD2AFAC008A39E0 /* NvimView+Resize.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NvimView+Resize.swift"; sourceTree = "<group>"; };
|
4B90F0111FD2AFAC008A39E0 /* NvimView+Resize.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NvimView+Resize.swift"; sourceTree = "<group>"; };
|
||||||
4B90F0121FD2AFAC008A39E0 /* KeyUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyUtils.swift; sourceTree = "<group>"; };
|
4B90F0121FD2AFAC008A39E0 /* KeyUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyUtils.swift; sourceTree = "<group>"; };
|
||||||
4B90F0131FD2AFAC008A39E0 /* NeoVimAutoCommandEvent.generated.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NeoVimAutoCommandEvent.generated.m; sourceTree = "<group>"; };
|
|
||||||
4B90F0141FD2AFAC008A39E0 /* NvimView+Dragging.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NvimView+Dragging.swift"; sourceTree = "<group>"; };
|
4B90F0141FD2AFAC008A39E0 /* NvimView+Dragging.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NvimView+Dragging.swift"; sourceTree = "<group>"; };
|
||||||
4B90F0151FD2AFAC008A39E0 /* NeoVimAutoCommandEvent.generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NeoVimAutoCommandEvent.generated.h; sourceTree = "<group>"; };
|
|
||||||
4B90F0161FD2AFAC008A39E0 /* CocoaExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CocoaExtensions.swift; sourceTree = "<group>"; };
|
4B90F0161FD2AFAC008A39E0 /* CocoaExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CocoaExtensions.swift; sourceTree = "<group>"; };
|
||||||
4B90F0171FD2AFAC008A39E0 /* NvimView+Mouse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NvimView+Mouse.swift"; sourceTree = "<group>"; };
|
4B90F0171FD2AFAC008A39E0 /* NvimView+Mouse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NvimView+Mouse.swift"; sourceTree = "<group>"; };
|
||||||
4B90F0181FD2AFAC008A39E0 /* NvimViewDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NvimViewDelegate.swift; sourceTree = "<group>"; };
|
4B90F0181FD2AFAC008A39E0 /* NvimViewDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NvimViewDelegate.swift; sourceTree = "<group>"; };
|
||||||
@ -207,8 +207,8 @@
|
|||||||
4B90F0201FD2AFAD008A39E0 /* MMCoreTextView.m */,
|
4B90F0201FD2AFAD008A39E0 /* MMCoreTextView.m */,
|
||||||
4B90F0191FD2AFAC008A39E0 /* NeoVimAgent.h */,
|
4B90F0191FD2AFAC008A39E0 /* NeoVimAgent.h */,
|
||||||
4B90F02C1FD2AFAE008A39E0 /* NeoVimAgent.m */,
|
4B90F02C1FD2AFAE008A39E0 /* NeoVimAgent.m */,
|
||||||
4B90F0151FD2AFAC008A39E0 /* NeoVimAutoCommandEvent.generated.h */,
|
4B2016ED1FD45EED0038528A /* NvimAutoCommandEvent.generated.h */,
|
||||||
4B90F0131FD2AFAC008A39E0 /* NeoVimAutoCommandEvent.generated.m */,
|
4B2016EC1FD45EED0038528A /* NvimAutoCommandEvent.generated.m */,
|
||||||
4B90F01D1FD2AFAC008A39E0 /* NeoVimObjectsExtensions.swift */,
|
4B90F01D1FD2AFAC008A39E0 /* NeoVimObjectsExtensions.swift */,
|
||||||
4B90F00F1FD2AFAC008A39E0 /* NvimUiBridgeProtocol.h */,
|
4B90F00F1FD2AFAC008A39E0 /* NvimUiBridgeProtocol.h */,
|
||||||
4B90F02A1FD2AFAD008A39E0 /* NeoVimUiBridgeProtocol.m */,
|
4B90F02A1FD2AFAD008A39E0 /* NeoVimUiBridgeProtocol.m */,
|
||||||
@ -276,9 +276,9 @@
|
|||||||
4B90F02D1FD2AFAE008A39E0 /* NvimUiBridgeProtocol.h in Headers */,
|
4B90F02D1FD2AFAE008A39E0 /* NvimUiBridgeProtocol.h in Headers */,
|
||||||
4BE45C161FD2DB53005C0A95 /* NeoVimWindow.h in Headers */,
|
4BE45C161FD2DB53005C0A95 /* NeoVimWindow.h in Headers */,
|
||||||
4BE45C1B1FD2DB53005C0A95 /* NeoVimBuffer.h in Headers */,
|
4BE45C1B1FD2DB53005C0A95 /* NeoVimBuffer.h in Headers */,
|
||||||
|
4B2016EF1FD45EED0038528A /* NvimAutoCommandEvent.generated.h in Headers */,
|
||||||
4BE45C191FD2DB53005C0A95 /* NeoVimTab.h in Headers */,
|
4BE45C191FD2DB53005C0A95 /* NeoVimTab.h in Headers */,
|
||||||
4B90F0441FD2AFAE008A39E0 /* MMCoreTextView.h in Headers */,
|
4B90F0441FD2AFAE008A39E0 /* MMCoreTextView.h in Headers */,
|
||||||
4B90F0331FD2AFAE008A39E0 /* NeoVimAutoCommandEvent.generated.h in Headers */,
|
|
||||||
4B90F0781FD2BA7B008A39E0 /* Logger.h in Headers */,
|
4B90F0781FD2BA7B008A39E0 /* Logger.h in Headers */,
|
||||||
4B90F07B1FD30650008A39E0 /* NeoVimMsgIds.h in Headers */,
|
4B90F07B1FD30650008A39E0 /* NeoVimMsgIds.h in Headers */,
|
||||||
);
|
);
|
||||||
@ -419,13 +419,13 @@
|
|||||||
4B90F0401FD2AFAE008A39E0 /* TextDrawer.m in Sources */,
|
4B90F0401FD2AFAE008A39E0 /* TextDrawer.m in Sources */,
|
||||||
4B90F02E1FD2AFAE008A39E0 /* NvimView.swift in Sources */,
|
4B90F02E1FD2AFAE008A39E0 /* NvimView.swift in Sources */,
|
||||||
4B90F03C1FD2AFAE008A39E0 /* NvimView+TouchBar.swift in Sources */,
|
4B90F03C1FD2AFAE008A39E0 /* NvimView+TouchBar.swift in Sources */,
|
||||||
|
4B2016EE1FD45EED0038528A /* NvimAutoCommandEvent.generated.m in Sources */,
|
||||||
4B90F03B1FD2AFAE008A39E0 /* NeoVimObjectsExtensions.swift in Sources */,
|
4B90F03B1FD2AFAE008A39E0 /* NeoVimObjectsExtensions.swift in Sources */,
|
||||||
4BE45C1A1FD2DB53005C0A95 /* NeoVimBuffer.m in Sources */,
|
4BE45C1A1FD2DB53005C0A95 /* NeoVimBuffer.m in Sources */,
|
||||||
4B90F04A1FD2AFAE008A39E0 /* NeoVimAgent.m in Sources */,
|
4B90F04A1FD2AFAE008A39E0 /* NeoVimAgent.m in Sources */,
|
||||||
4B90F0351FD2AFAE008A39E0 /* NvimView+Mouse.swift in Sources */,
|
4B90F0351FD2AFAE008A39E0 /* NvimView+Mouse.swift in Sources */,
|
||||||
4B90F0431FD2AFAE008A39E0 /* NvimView+MenuItems.swift in Sources */,
|
4B90F0431FD2AFAE008A39E0 /* NvimView+MenuItems.swift in Sources */,
|
||||||
4B90F0391FD2AFAE008A39E0 /* NvimView+Api.swift in Sources */,
|
4B90F0391FD2AFAE008A39E0 /* NvimView+Api.swift in Sources */,
|
||||||
4B90F0311FD2AFAE008A39E0 /* NeoVimAutoCommandEvent.generated.m in Sources */,
|
|
||||||
4B90F0451FD2AFAE008A39E0 /* Logger.swift in Sources */,
|
4B90F0451FD2AFAE008A39E0 /* Logger.swift in Sources */,
|
||||||
4B90F0321FD2AFAE008A39E0 /* NvimView+Dragging.swift in Sources */,
|
4B90F0321FD2AFAE008A39E0 /* NvimView+Dragging.swift in Sources */,
|
||||||
4B90F0491FD2AFAE008A39E0 /* CellAttributes.swift in Sources */,
|
4B90F0491FD2AFAE008A39E0 /* CellAttributes.swift in Sources */,
|
||||||
|
@ -603,12 +603,12 @@ static CFDataRef local_server_callback(CFMessagePortRef local __unused, SInt32 m
|
|||||||
case NeoVimServerMsgIdAutoCommandEvent: {
|
case NeoVimServerMsgIdAutoCommandEvent: {
|
||||||
if (data.length == 2 * sizeof(NSInteger)) {
|
if (data.length == 2 * sizeof(NSInteger)) {
|
||||||
NSInteger *values = (NSInteger *) data.bytes;
|
NSInteger *values = (NSInteger *) data.bytes;
|
||||||
NeoVimAutoCommandEvent event = (NeoVimAutoCommandEvent) values[0];
|
NvimAutoCommandEvent event = (NvimAutoCommandEvent) values[0];
|
||||||
NSInteger bufferHandle = (values + 1)[0];
|
NSInteger bufferHandle = (values + 1)[0];
|
||||||
[_bridge autoCommandEvent:event bufferHandle:bufferHandle];
|
[_bridge autoCommandEvent:event bufferHandle:bufferHandle];
|
||||||
} else {
|
} else {
|
||||||
NSInteger *values = data_to_NSInteger_array(data, 1);
|
NSInteger *values = data_to_NSInteger_array(data, 1);
|
||||||
[_bridge autoCommandEvent:(NeoVimAutoCommandEvent) values[0] bufferHandle:-1];
|
[_bridge autoCommandEvent:(NvimAutoCommandEvent) values[0] bufferHandle:-1];
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
@import Foundation;
|
@import Foundation;
|
||||||
|
|
||||||
#import "NeoVimAutoCommandEvent.generated.h"
|
#import "NvimAutoCommandEvent.generated.h"
|
||||||
|
|
||||||
|
|
||||||
// Keep in sync with ModeShape enum in cursor_shape.h.
|
// Keep in sync with ModeShape enum in cursor_shape.h.
|
||||||
@ -130,7 +130,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
- (void)setDirtyStatus:(bool)dirty;
|
- (void)setDirtyStatus:(bool)dirty;
|
||||||
- (void)cwdChanged:(NSString *)cwd;
|
- (void)cwdChanged:(NSString *)cwd;
|
||||||
- (void)colorSchemeChanged:(NSArray <NSNumber *> *)values;
|
- (void)colorSchemeChanged:(NSArray <NSNumber *> *)values;
|
||||||
- (void)autoCommandEvent:(NeoVimAutoCommandEvent)event bufferHandle:(NSInteger)bufferHandle;
|
- (void)autoCommandEvent:(NvimAutoCommandEvent)event bufferHandle:(NSInteger)bufferHandle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NeoVim has been stopped.
|
* NeoVim has been stopped.
|
||||||
|
@ -189,9 +189,9 @@ extension NvimView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func autoCommandEvent(_ event: NeoVimAutoCommandEvent, bufferHandle: Int) {
|
public func autoCommandEvent(_ event: NvimAutoCommandEvent, bufferHandle: Int) {
|
||||||
gui.async {
|
gui.async {
|
||||||
self.bridgeLogger.debug("\(neoVimAutoCommandEventName(event)) -> \(bufferHandle)")
|
self.bridgeLogger.debug("\(nvimAutoCommandEventName(event)) -> \(bufferHandle)")
|
||||||
|
|
||||||
if event == .BUFWINENTER || event == .BUFWINLEAVE {
|
if event == .BUFWINENTER || event == .BUFWINLEAVE {
|
||||||
self.bufferListChanged()
|
self.bufferListChanged()
|
||||||
|
@ -23,4 +23,4 @@ FOUNDATION_EXPORT const unsigned char NvimViewVersionString[];
|
|||||||
#import <NvimView/NeoVimBuffer.h>
|
#import <NvimView/NeoVimBuffer.h>
|
||||||
#import <NvimView/NeoVimTab.h>
|
#import <NvimView/NeoVimTab.h>
|
||||||
#import <NvimView/NeoVimWindow.h>
|
#import <NvimView/NeoVimWindow.h>
|
||||||
#import <NvimView/NeoVimAutoCommandEvent.generated.h>
|
#import <NvimView/NvimAutoCommandEvent.generated.h>
|
||||||
|
@ -7,7 +7,7 @@ from string import Template
|
|||||||
|
|
||||||
print(os.getcwd())
|
print(os.getcwd())
|
||||||
if 'CONFIGURATION' in os.environ and os.environ['CONFIGURATION'] == 'Debug':
|
if 'CONFIGURATION' in os.environ and os.environ['CONFIGURATION'] == 'Debug':
|
||||||
if os.path.isfile('./NvimView/NeoVimAutoCommandEvent.generated.h') and os.path.isfile('./NvimView/NeoVimAutoCommandEvent.generated.m'):
|
if os.path.isfile('./NvimView/NvimAutoCommandEvent.generated.h') and os.path.isfile('./NvimView/NvimAutoCommandEvent.generated.m'):
|
||||||
print("Files already there, exiting...")
|
print("Files already there, exiting...")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
@ -24,9 +24,9 @@ auto_cmds = [convert(line) for line in raw_auto_cmds]
|
|||||||
auto_cmds_impl_template = Template(
|
auto_cmds_impl_template = Template(
|
||||||
'''
|
'''
|
||||||
@import Foundation;
|
@import Foundation;
|
||||||
#import "NeoVimAutoCommandEvent.generated.h"
|
#import "NvimAutoCommandEvent.generated.h"
|
||||||
|
|
||||||
NSString *neoVimAutoCommandEventName(NeoVimAutoCommandEvent event) {
|
NSString *nvimAutoCommandEventName(NvimAutoCommandEvent event) {
|
||||||
switch (event) {
|
switch (event) {
|
||||||
${event_cases}
|
${event_cases}
|
||||||
default: return @"NON_EXISTING_EVENT";
|
default: return @"NON_EXISTING_EVENT";
|
||||||
@ -36,28 +36,28 @@ ${event_cases}
|
|||||||
|
|
||||||
impl = auto_cmds_impl_template.substitute(
|
impl = auto_cmds_impl_template.substitute(
|
||||||
event_cases='\n'.join(
|
event_cases='\n'.join(
|
||||||
[' case NeoVimAutoCommandEvent{}: return @"{}";'.format(event[0], event[0]) for event in auto_cmds])
|
[' case NvimAutoCommandEvent{}: return @"{}";'.format(event[0], event[0]) for event in auto_cmds])
|
||||||
)
|
)
|
||||||
with io.open('./NvimView/NeoVimAutoCommandEvent.generated.m', 'w') as auto_cmds_impl_file:
|
with io.open('./NvimView/NvimAutoCommandEvent.generated.m', 'w') as auto_cmds_impl_file:
|
||||||
auto_cmds_impl_file.write(unicode(impl))
|
auto_cmds_impl_file.write(unicode(impl))
|
||||||
|
|
||||||
auto_cmds_header_template = Template(
|
auto_cmds_header_template = Template(
|
||||||
'''
|
'''
|
||||||
@import Foundation;
|
@import Foundation;
|
||||||
|
|
||||||
typedef NS_ENUM(NSUInteger, NeoVimAutoCommandEvent) {
|
typedef NS_ENUM(NSUInteger, NvimAutoCommandEvent) {
|
||||||
${event_cases}
|
${event_cases}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NumberOfAutoCommandEvents ${count}
|
#define NumberOfAutoCommandEvents ${count}
|
||||||
extern NSString * __nonnull neoVimAutoCommandEventName(NeoVimAutoCommandEvent event);
|
extern NSString * __nonnull nvimAutoCommandEventName(NvimAutoCommandEvent event);
|
||||||
''')
|
''')
|
||||||
|
|
||||||
header = auto_cmds_header_template.substitute(
|
header = auto_cmds_header_template.substitute(
|
||||||
event_cases='\n'.join(
|
event_cases='\n'.join(
|
||||||
[' NeoVimAutoCommandEvent{} = {},'.format(event[0], event[1]) for event in auto_cmds]
|
[' NvimAutoCommandEvent{} = {},'.format(event[0], event[1]) for event in auto_cmds]
|
||||||
),
|
),
|
||||||
count=str(len(auto_cmds))
|
count=str(len(auto_cmds))
|
||||||
)
|
)
|
||||||
with io.open('./NvimView/NeoVimAutoCommandEvent.generated.h', 'w') as auto_cmds_header_file:
|
with io.open('./NvimView/NvimAutoCommandEvent.generated.h', 'w') as auto_cmds_header_file:
|
||||||
auto_cmds_header_file.write(unicode(header))
|
auto_cmds_header_file.write(unicode(header))
|
||||||
|
Loading…
Reference in New Issue
Block a user