kvichans / cuda_ext Goto Github PK
View Code? Open in Web Editor NEWCudaText plugin with misc commands
CudaText plugin with misc commands
есть файл в котором каретка на имени main.css
<link href="main.css" rel="stylesheet" type="text/css">
</head>
можно сделать- команда "открыть по выделению" открывает файл main.css? та же папка
use_tab = not apx.get_opt('tab_spaces')
sps_tab = ' '*apx.get_opt('tab_size')
нет, надо делать это ed.get_prop(PROP_TAB*)
"Align paragraph - options"
или
"Paragraph options"
1.3.01 (2017-06-28)
added: 6 commands "Jump to next/previous changed/saved/working lines" (work by colored line status on gutter)
1.2.9 (2017-06-16)
added: cmd "Delete duplicate spaces"
fixed: don't use deprecated API
1.2.8 (2017-05-22)
added: cmd "Open all files in dir and sub-dirs"
added: cmd "Remove ASCII chars 0..31"
1.2.7 (2017-03-30)
added: 2 cmds "Switch tab to first/last in other group"
1.2.6 (2016-12-30)
added: cmd "Re-wrap/split lines by margin"
1.2.5 (2016-09-13)
removed: command "Edit lexer comment chars" removed to plugin Comments
1.2.4 (2016-08-02)
added: cmd "New file as save-as in current folder..."
removed: dialog Favorites removed to its own plugin
1.2.3 (2016-05-26)
added: dlg Favorites
1.2.2 (2016-05-26)
changed: cmd "Go back" uses "visited history"
1.2.0 (2016-05-23)
added: cmd "Copy word or [expression] or 'expression'"
added: cmd "Expand selection", which expands like: caret->word->'smth'->('smth')->f(smth)->...
added: cmds "Switch tab in inactive group"
1.1.0 (2016-05-19)
internal rework
1.0.8 (2016-05-16)
added: cmd "Go back" to activate previous active tab
added: cmds "Close tab in next/previous group"
added: cmd "Show current tree path in status"
added: cmd "Set nearest tree node"
1.0.7 (2016-04-01)
added: cmd "Navigate by error in console"
changed: cmd "Open file by selected name" recognizes "path(line)"
1.0.5 (2016-04-01)
added: cmd "Paste with indent" like in IDEs
1.0.4 (2016-02-24)
added: cmd "Rename current file"
added: cmd "Open file(s) near current tab"
added: cmd "Move tab to position"
1.0.3 (2016-02-14)
added: used new API ed.get_prop(PROP_LINE_TOP)
1.0.2 (2016-02-03)
added: cmd "Scroll current line to screen center"
added: cmd "Align in lines by separator"
1.0.1 (2016-01-22)
changed: renamed commands to use prefix "CudaExt:"
0.9.5 (2016-01-22)
added: cmd "Edit stream comment chars for lexer"
0.9.4 (2016-01-14)
added: cmd "Replace all fragment as selected to clipboard"
rework: cmd "Find clipboard string" saves user find-settings
0.9.2 (2016-01-11)
added: cmd "Move splitters"
0.9.1 (2015-12-26)
added: cmd "Swith tab to next/previous"
0.9.0 (2015-11-25)
init
Плс, посм. как работает хоткей Alt+Shfift+W в Субл.
Он берет выделение, кладет его в тег p
<p>selected</p>
и ставит 2 керетки на начало и конец тега
Говорят что это удобно!
From Cud
"Replace all fragment as selected with clipboard value"-->
"Replace all occurrences of selected string, with clipboard string"
error in finding bracket.
(Cannot unpack ' ')
(c_opn
,c_cls
,col) = apx.icase(
,c_bfr=='»', ('»', '«', from_x-2)
,' ')
You assign ' ' to 3-tuple. if case is **last.
Rename- такое есть в син. мне это иногда надо но не хочется Пас-кодом делать. можно сделать? чтобы таб переоткрывался с новым именем после ренейма. (можно на том же месте в группе?)
(и желательно диалог ренейма как в Син.)
Wish
Cmd must see dir of current named tab. And make new empty file in this dir, after Save-as.
Команда нужна часто. еще в Син просили раза 2. и сам пользуюсь
aa = 1
aaaa = 2
aaaaaaaaaa = 3
bbb
cccc
ddd = 4
==>
aa = 1
aaaa = 2
aaaaaaaaaa = 3
bbb
cccc
ddd = 4
"show current Tree path in Status"-->
"Show current Code Tree path in statusbar"
http://synwrite.sourceforge.net/forums/viewtopic.php?p=10816#p10816
Описано что такое 4 типа параграфа для писателей
Просят 4 команды для всех типов параграфов
Justification would include:
a. Left justified (smooth left edge, ragged right edge)
b. Right justified (ragged left edge, smooth right edge)
c. Center justified (ragged left/right edge)
d. Fully justified (smooth left/right edge)
smooth- выровненый край
ragged- грубый край
fully- значит раздвигать пробелами
удобно сделать 4 кмд для 4 типов через 1 диалог с radiogroups
Вот такой виш, это сложно сделать? https://www.reddit.com/r/SublimeText/comments/5ktek1/is_there_a_plugin_to_make_justified_alignment_for/
Выделение "вверх"- от нижней строки (блок 4 строки) до верха
Плагин не делает align при этом
Что она делает? по названию непонятно.
Если из диалога Заменить дать команду ЗаменитьВсе, то текст дергается, быстро отображая перемещение к очередному найденному фрагменту и его замену.
Можно ли отключить показ промежуточных состояний?
лажовый Inf: goto tab N group 2-- неверно.
Атом умеет так
dde=dd
dddee=dd
eeeeeeааа=ee
d=ed
ee=eeddd
тут 2 выделения. строка 1-2 и второе строка 4-5.
команда выровнит два выделения, и не тронет строку 3.
dde = dd
dddee = dd
eeeeeeааа=ee
d = ed
ee = eeddd
такая команда есть в Лазарус+Сублиме. Она вставляет блок и подстраивает его строки чтобы был нормальный indent- чтобы стыковалось с кодом до вставки
(учитывает инденты строк до блока и инденты строк блока)
описание https://t.co/5SJDmx0RJK
Команду простую хочется
на Ru-board просили такой код, который к выделениб делает html tags:
<b>sel here</b>
Можно сюда добавить?
My change:
[info]
title=CudaExt
desc=Additional commands for CudaText in Commands dialog (not visible in Plugins menu)
type=cudatext-plugin
subdir=cuda_ext
I would like to be able to go back to the previous tab via a hotkey. Suppose there are four tabs: [1], [2], [3], [4], and the user activates [1], then [2], then [4], and then presses the hotkey ==> [2] should become active. When the user presses the hotkey again ==> [4] should become active. When the user presses the hotkey again ==> [2] should become active. And so on.
In SynWrite, Ctrl+Tab has the desired behaviour. But note that I don't need the dialog as in SynWrite. Simply going back to the previous tab (without a dialog) would be sufficient.
This feature would be be very useful in conjunction with the new Find in Files feature, because it would make possible to switch back and forth between the search results and the source code tabs in a quick and easy manner.
Релиз имеет
def edit_strcomment_chars(self):
но мы его удаляли в cuda_comments
FROM_API_VERSION = '1.0.119'
MIN_API_VER_4_REPL = '1.0.169'
+FROM_API_VERSION = '1.0.182' # PROC_SPLITTER_GET/SET, LOG_CONSOLE_GET_MEMO_LINES
Зачем то 3 проверки
Поправил у себя /prev/==>/previous/,
заметил у вас кривое /prev/-
Find clipboard string: prev
Activate prev tab
a. Go to Beginning of Paragraph
b. Go to End of Paragraph
c. Go to Previous Paragraph
d. Go to Next Paragraph.
На форуме просят эти команды
Параграфы отделяются пустыми строками (1 иои больше).
Command Activate previously active tab (go back)
is remaked.
Now the cmd uses visit history.
HowTo:
Shift
, Ctrl
, Alt
, Win/Meta
.F3
- bad, Ctrl+Tab
- good, Ctrl+Shift+Alt+Win+Q
- good.Note.
Hotkey without modifier key(s) is legal too. But it will always jump to prev-tab.
Example. How to use both tab-jumping (from my config):
Ctrl+Tab
for natural-style jumping in visible order of tabsCtrl+]
for smart-style jumping in history order of tabsРасписано здесь
Alexey-T/CudaText#939
АПИ вот тут
http://wiki.freepascal.org/CudaText_API#folding
не хочется добавлять в ядро. Трудный момент -
при правке, ядро очищает список fold ranges, ваш фолд пропадет
Вот такую фичу имеет новый Делфи, для пастинга выводов от DB, вот описание и скрин
http://docwiki.embarcadero.com/RADStudio/Berlin/en/MultiPaste
Счас сплиттер считается как поз=поз*1.05
.. ? тогда это гео прогрессия
а лучше делать ари прогрессию
поз=поз + 0.05*размер_панели
margin: 2000 (to hide it on screen).
Rewrap takes 2000. bad
http://forum.wincmd.ru/viewtopic.php?p=113980#113980
команда как Ctrl+Tab но **по всем группам сразу
Original exception was:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/cuda/cuda/app/py/cuda_ext/__init__.py", line 19, in open_selected
def open_selected(self): return RLS.open_selected()
File "/home/user/cuda/cuda/app/py/cuda_ext/cd_ext.py", line 359, in open_selected
op_ed = _file_open(op_file)
File "/home/user/cuda/cuda/app/py/cuda_ext/cd_ext.py", line 86, in _file_open
if os.path.samefile(op_file, op_ed.get_filename()):
File "/usr/lib/python3.4/genericpath.py", line 91, in samefile
s2 = os.stat(f2)
FileNotFoundError: [Errno 2] No such file or directory: '?'
При открытии иконки (для нее будет filename="?") через кмд-
в html это так пишется-
<link rel="SHORTCUT ICON" href="favicon.ico">
Виш, на 2 команды
пример вывода, н=15
ddd ddd ddddddd
ddddd ddddd dd
dddd dddddd ddd
ddd ddddd ddd
```
Пригодится если нужно для лекса задать символ комента ()
и не лазить в файл .cfg
Pls add this method
def run(self):
s=ed.get_text_all()
for i in range(32):
if not i in [10,13,9]:
s=s.replace(chr(i), '')
ed.set_text_all(s)
Тут тоже - надо удалить код просто
Это делается через ed.get_prop(PROP_LINE_STATE)
В Сине есть эти кмд.
"Open all files from asked dir and subdirs..."->
"Open all files, from folder with sub-folders..."
"Lazarus Paste" not nice, 'paster' not 1st word; wish: "Paste like Lazarus IDE"
"Move splitter to ... tree panel"->
"Move splitter to ... side panel"
New command Copy word or [expression] or 'expression' without selection
.
New command Replace word or [expression] or 'expression with clip
Both commands parse text around caret and use a minimal usefull part for action.
If caret is inside or near word - the word will be used.
If caret is near 'smth'
or [smth]
- this string will be used. (See Notes)
New command Expand selection to word or "expression" or (expression)
New command Expand and copy selection to word or "expression" or (expression)
Expand current selection to the nearest usefull state:
caret -> word -> phrase in brakets/quotes -> phrase with brakets/quotes -> ...
Example. | caret, <...> selection
fun('smt an|d oth', par)
fun('smt <and> oth', par)
fun('smt< and >oth', par)
fun('<smt and oth>', par)
fun(<'smt and oth'>, par)
fun(<'smt and oth', par>)
fun<('smt and oth', par)>
<fun('smt and oth', par)>
To parse word the commands use option from def/user/lexer
//jump-next-word, jump-prev-word, select-word (double-click) will
//see these additional chars as "letters" and select them like letters.
//Don't enter here: Latin/Rus/Greek/German letters, "0".."9", "_".
//Note: config read as utf8-no-bom.
"word_chars": "",
List of quotes can be changed with option
"cudaext_quotes":"\"'",
List of brackets can be changed with option
"cudaext_brackets":"[](){}<>",
Добавить команду для подмены начальных сдвигов у выделенных строк
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.