r S -> заменяет символ под курсором на символ S
parent
b6c9f087be
commit
fbbb032be3
|
@ -172,22 +172,18 @@ class VimModel:
|
|||
self.LoadFile("config/usage.txt")
|
||||
return ReturnCode.SET_BASIC_MODE
|
||||
case _:
|
||||
# Открывает файл
|
||||
# Открывает файл filename
|
||||
if len(cmd) > 2 and cmd[:2] == 'o ':
|
||||
filename = cmd[2:]
|
||||
self.LoadFile(filename)
|
||||
return ReturnCode.SET_BASIC_MODE
|
||||
# Запись в файл
|
||||
# Запись в файл filename
|
||||
elif len(cmd) > 2 and cmd[:2] == 'w ':
|
||||
filename = cmd[2:]
|
||||
self.WriteFile(filename)
|
||||
# Переход на строку по указанному номеру
|
||||
elif len(cmd) > 1 and cmd[-1] == 'G':
|
||||
if cmd[:-1].isdigit():
|
||||
numberLine = int(cmd[:-1])
|
||||
if numberLine >= 0 and numberLine < len(self.displayBuffer):
|
||||
self.currentLine = numberLine
|
||||
self.currentCol = 0
|
||||
# Заменяет символ на указанный
|
||||
elif len(cmd) == 3 and cmd[:2] == 'r ':
|
||||
self.displayBuffer[self.currentLine][self.currentCol] = cmd[2]
|
||||
|
||||
return ReturnCode.GOOD
|
||||
|
||||
|
|
Loading…
Reference in New Issue