<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932430</guid>
        <pubDate>Sun, 30 Nov 2025 18:20:00 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932430</link>
        <description><![CDATA[Majestio: <div class="tag-spoiler spoiler closed"><div class="spoiler_header" onclick="openCloseParent(this)">Скрытый текст</div><div class="body">На неделе попробую глянуть. Ща пока о5 занят.</div></div>]]></description>
        <author>Majestio</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932429</guid>
        <pubDate>Sun, 30 Nov 2025 18:02:56 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932429</link>
        <description><![CDATA[Qraizer: <div class="tag-spoiler spoiler closed"><div class="spoiler_header" onclick="openCloseParent(this)">Раз уж пошла такая пьянка, вот мой скрипт для автоотступов</div><div class="body"><div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">local strip = function(str)</div><div class="code_line">&nbsp;&nbsp;local i</div><div class="code_line">&nbsp;&nbsp;</div><div class="code_line">&nbsp;&nbsp;i = 1</div><div class="code_line">&nbsp;&nbsp;while str:sub(i, i) == &quot; &quot; or str:sub(i, i) == &quot;\t&quot; do i = i + 1 end</div><div class="code_line">&nbsp;&nbsp;str = str:sub(i)</div><div class="code_line">&nbsp;&nbsp;i = -1</div><div class="code_line">&nbsp;&nbsp;while str:sub(i, i) == &quot; &quot; or str:sub(i, i) == &quot;\t&quot; do i = i - 1 end</div><div class="code_line">&nbsp;&nbsp;str = str:sub(1, i)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;return str</div><div class="code_line">end</div><div class="code_line">&nbsp;&nbsp;</div><div class="code_line">local newLine = function()</div><div class="code_line">&nbsp;&nbsp;local F &nbsp; &nbsp; &nbsp;= far.Flags</div><div class="code_line">&nbsp;&nbsp;local ei &nbsp; &nbsp; = editor.GetInfo(nil);</div><div class="code_line">&nbsp;&nbsp;local x &nbsp; &nbsp; &nbsp;= 1</div><div class="code_line">&nbsp;&nbsp;local y &nbsp; &nbsp; &nbsp;= ei.CurLine</div><div class="code_line">&nbsp;&nbsp;local curStr = editor.GetString(nil, y, 0).StringText</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;while strip(curStr) == &quot;&quot; and y ~= 1 do</div><div class="code_line">&nbsp;&nbsp; &nbsp;y = y - 1</div><div class="code_line">&nbsp;&nbsp; &nbsp;curStr = editor.GetString(nil, y, 0).StringText</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;while x &#60;= #curStr do</div><div class="code_line">&nbsp;&nbsp; &nbsp;if curStr:sub(x, x) == &quot; &quot; or curStr:sub(x, x) == &quot;\t&quot; then x = x + 1 else break end</div><div class="code_line">-- &nbsp; &nbsp;if string.sub(curStr.StringText,x,1) == &quot;\t&quot; then x = ei.TabSize * ei.math.floor((x + ei.TabSize-1)/ei.TabSize) end</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;editor.UndoRedo(nil, F.EUR_BEGIN)</div><div class="code_line">&nbsp;&nbsp;editor.InsertString()</div><div class="code_line">&nbsp;&nbsp;if strip(editor.GetString(nil, ei.CurLine, 0).StringText) == &quot;&quot; then</div><div class="code_line">&nbsp;&nbsp; &nbsp;editor.SetString(nil, ei.CurLine, &quot;&quot;)</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;editor.SetPosition(nil, ei.CurLine+1, x, -1, -1, -1, -1)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;curStr = strip(editor.GetString(nil, 0, 0).StringText)</div><div class="code_line">&nbsp;&nbsp;if #curStr ~= 0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp;editor.SetString(nil, 0, string.rep(&quot; &quot;, x-1)..curStr)</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;editor.UndoRedo(nil, F.EUR_END)</div><div class="code_line">end</div><div class="code_line">&nbsp;</div><div class="code_line">local newTab = function()</div><div class="code_line">&nbsp;&nbsp;local F &nbsp; &nbsp; &nbsp;= far.Flags</div><div class="code_line">&nbsp;&nbsp;local ei &nbsp; &nbsp; = editor.GetInfo(nil);</div><div class="code_line">&nbsp;&nbsp;local x &nbsp; &nbsp; &nbsp;= ei.CurPos</div><div class="code_line">&nbsp;&nbsp;local y &nbsp; &nbsp; &nbsp;= ei.CurLine</div><div class="code_line">&nbsp;&nbsp;local curStr = &quot;&quot;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;while strip(curStr) == &quot;&quot; and y ~= 1 do</div><div class="code_line">&nbsp;&nbsp; &nbsp;y = y - 1</div><div class="code_line">&nbsp;&nbsp; &nbsp;curStr = editor.GetString(nil, y, 0).StringText</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;while x &#60;= #curStr do</div><div class="code_line">&nbsp;&nbsp; &nbsp;if curStr:sub(x, x) ~= &quot; &quot; and curStr:sub(x, x) ~= &quot;\t&quot; then x = x + 1 else break end</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;while x &#60;= #curStr do</div><div class="code_line">&nbsp;&nbsp; &nbsp;if curStr:sub(x, x) == &quot; &quot; or curStr:sub(x, x) == &quot;\t&quot; then x = x + 1 else break end</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;if x &#62; #curStr then</div><div class="code_line">&nbsp;&nbsp; &nbsp;x = (math.floor((ei.CurPos-1) / ei.TabSize) + 1) * ei.TabSize + 1</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;local pos = ei.CurPos</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;while pos &#60; x do</div><div class="code_line">&nbsp;&nbsp; &nbsp;editor.UndoRedo(nil, F.EUR_BEGIN)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;local tmpPos = (math.floor((pos-1) / ei.TabSize) + 1) * ei.TabSize + 1</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if tmpPos &#62; x then tmpPos = x end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;editor.InsertText(nil, string.rep(&quot; &quot;, tmpPos-1 - pos+1))</div><div class="code_line">&nbsp;&nbsp; &nbsp;editor.UndoRedo(nil, F.EUR_END)</div><div class="code_line">&nbsp;&nbsp; &nbsp;pos = tmpPos</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">end</div><div class="code_line">&nbsp;</div><div class="code_line">Macro {</div><div class="code_line">&nbsp;&nbsp;area=&quot;Editor&quot;; key=&quot;Enter&quot;; flags=&quot;&quot;; description=&quot;Insert new line&quot;; action = function()</div><div class="code_line">newLine()</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">Macro {</div><div class="code_line">&nbsp;&nbsp;area=&quot;Editor&quot;; key=&quot;Tab&quot;; flags=&quot;&quot;; description=&quot;Insert new tab&quot;; action = function()</div><div class="code_line">newTab()</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script></div></div><br>
При нажатии TAB автоматически ищет позицию правее так, чтобы курсор остановился напротив первого непробельного символа на наинижайшей непустой строке выше с пробелами и с непробельными символами правее текущей позиции курсора. Ну т.е. курсор прыгает к самой левой позиции, правее текущей, чтобы встать на границе очередного &quot;слова&quot; строки выше. Если предыдущая строка пустая, берётся ещё более предыдущая. Если строка выше короче текущей, тогда TAB работает стандартно, как исходный TAB.<br>
При нажатии ENTER автоматически удаляет финальные пробелы в текущей строке и перемещает курсор в новую строку в позицию самого левого непробельного символа в текущей. Т.е. выдерживается тот же отступ. Если текущая строка пуста, берётся строка выше текущей по тем же правилам, что для TAB. Если подходящей строки не найдено, в новой строке отступа не будет.<br>
При вставке отступов, что по TAB, что по ENTER, вставляемые отступы добавляются поTABно, и каждый из них добавляется в UndoRedo, что легко их откатывает поэлементно даже если было вставлено несколько за раз.<br>
Скрипт был написан мною спецом под набор исходного кода, где желаемые отступы в подавляющем большинстве случаев определяются именно этими правилами. Скрипт может конфликтовать с AutoComplete, если нажать TAB или ENTER в тот момент, когда он предлагает варианты для дополнения, но это не моя проблема, скрипт не в состоянии обнаружить такие ситуации сам.]]></description>
        <author>Qraizer</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932424</guid>
        <pubDate>Sun, 30 Nov 2025 09:50:36 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932424</link>
        <description><![CDATA[Majestio: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=418325&view=findpost&p=3932422'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Dushevny &#064; <time class="tag-quote__quoted-time" datetime="2025-11-30T09:27:38+00:00">30.11.25, 09:27</time></span><div class='quote '>Было бы логично, если бы он сам выделял нужное просто по факту нахождения курсора где-то внутри нужного текста.</div></div><br>
Возможно, но мне лениво. Особенно если это касается парсинга многострочного src...<br>
<br>
<img class='tag-img' src='https://s1.hostingkartinok.com/uploads/images/2025/11/91048581b391b8d70e570f4174317f56.jpg' alt='user posted image'>]]></description>
        <author>Majestio</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932422</guid>
        <pubDate>Sun, 30 Nov 2025 09:27:38 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932422</link>
        <description><![CDATA[Dushevny: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=418325&view=findpost&p=3932420'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Majestio &#064; <time class="tag-quote__quoted-time" datetime="2025-11-30T07:08:14+00:00">30.11.25, 07:08</time></span><div class='quote '>Выделяйте блок аккуратно и правильно </div></div>Было бы логично, если бы он сам выделял нужное просто по факту нахождения курсора где-то внутри нужного текста.<br>
<span class="b-attach" data-size="58613" data-hits="45" data-attach-id="67522" data-attach-post-id="3932422">
			<span class="b-attach__title"></span><a class='b-attach-link' href='https://forum.sources.ru/index.php?act=Attach&amp;type=post&amp;id=3932422&amp;attach_id=67522' title='Скачать файл' target='_blank'>Screenshot_from_2025_11_30_11_26_52.png</a> (, : 45)
		</span>]]></description>
        <author>Dushevny</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932420</guid>
        <pubDate>Sun, 30 Nov 2025 07:08:14 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932420</link>
        <description><![CDATA[Majestio: <span class='tag-size' data-value='14' style='font-size:14pt;'>Хозяйке на заметку: извлечение встроенной BASE64-кодированной картинки во встроенном редакторе Far</span><br>
<br>
Может кому и пригодиться... Надоело пользоваться online-извлекаторами с тоннами рекламы, сделал свой. Уютный и ламповый&#33; :) <br>
<br>
Пользоваться просто. Допустим есть нечто в виде:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;img src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3/OAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANCSURBVEiJtZZPbBtFFMZ/M7ubXdtdb1xSFyeilBapySVU8h8OoFaooFSqiihIVIpQBKci6KEg9Q6H9kovIHoCIVQJJCKE1ENFjnAgcaSGC6rEnxBwA04Tx43t2FnvDAfjkNibxgHxnWb2e/u992bee7tCa00YFsffekFY+nUzFtjW0LrvjRXrCDIAaPLlW0nHL0SsZtVoaF98mLrx3pdhOqLtYPHChahZcYYO7KvPFxvRl5XPp1sN3adWiD1ZAqD6XYK1b/dvE5IWryTt2udLFedwc1+9kLp+vbbpoDh+6TklxBeAi9TL0taeWpdmZzQDry0AcO+jQ12RyohqqoYoo8RDwJrU+qXkjWtfi8Xxt58BdQuwQs9qC/afLwCw8tnQbqYAPsgxE1S6F3EAIXux2oQFKm0ihMsOF71dHYx+f3NND68ghCu1YIoePPQN1pGRABkJ6Bus96CutRZMydTl+TvuiRW1m3n0eDl0vRPcEysqdXn+jsQPsrHMquGeXEaY4Yk4wxWcY5V/9scqOMOVUFthatyTy8QyqwZ+kDURKoMWxNKr2EeqVKcTNOajqKoBgOE28U4tdQl5p5bwCw7BWquaZSzAPlwjlithJtp3pTImSqQRrb2Z8PHGigD4RZuNX6JYj6wj7O4TFLbCO/Mn/m8R+h6rYSUb3ekokRY6f/YukArN979jcW+V/S8g0eT/N3VN3kTqWbQ428m9/8k0P/1aIhF36PccEl6EhOcAUCrXKZXXWS3XKd2vc/TRBG9O5ELC17MmWubD2nKhUKZa26Ba2+D3P+4/MNCFwg59oWVeYhkzgN/JDR8deKBoD7Y+ljEjGZ0sosXVTvbc6RHirr2reNy1OXd6pJsQ+gqjk8VWFYmHrwBzW/n+uMPFiRwHB2I7ih8ciHFxIkd/3Omk5tCDV1t+2nNu5sxxpDFNx+huNhVT3/zMDz8usXC3ddaHBj1GHj/As08fwTS7Kt1HBTmyN29vdwAw+/wbwLVOJ3uAD1wi/dUH7Qei66PfyuRj4Ik9is+hglfbkbfR3cnZm7chlUWLdwmprtCohX4HUtlOcQjLYCu+fzGJH2QRKvP3UNz8bWk1qMxjGTOMThZ3kvgLI5AzFfo379UAAAAASUVORK5CYII=&quot;&#62;</div></ol></div></div></div></div><br>
<br>
Выделяем все, что между двойными кавычками и жмём <strong class='tag-b'>Ctrl+Alt+I</strong>, в открывшемся диалоге вводим имя сохраняемого файла без расширения. Бинго&#33;<br>
<br>
Макро ложить вот сюда: <span class="tag-color tag-color-named" data-value="blue" style="color: blue">%FARHOME%&#092;Profile&#092;Macros&#092;scripts&#092;DecodeImage</span> (ну или где у вас там хранится, может в профилях пользователя венды)<br>
<br>
<div class="tag-spoiler spoiler closed"><div class="spoiler_header" onclick="openCloseParent(this)">Скрытый текст</div><div class="body"><strong class='tag-b'>DecodeBase64Image.lua</strong><br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">--[[</div><div class="code_line">&nbsp;&nbsp; &nbsp;DecodeBase64Image для Far Manager</div><div class="code_line">&nbsp;&nbsp; &nbsp;Версия: 1.0</div><div class="code_line">&nbsp;&nbsp; &nbsp;Автор: Majestio</div><div class="code_line">&nbsp;&nbsp; &nbsp;Copyright © 2025 Majestio</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Данная программа распространяется под лицензией MIT.</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Разрешается использование, копирование, изменение, слияние, публикация,</div><div class="code_line">&nbsp;&nbsp; &nbsp;распространение, сублицензирование и/или продажа копий программы</div><div class="code_line">&nbsp;&nbsp; &nbsp;без каких-либо ограничений при соблюдении следующих условий:</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;1. Вышеуказанное уведомление об авторских правах и данное условие</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; разрешения должны быть включены во все копии или существенные части</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; программы.</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;2. ПРОГРАММА ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; явных или подразумеваемых, включая (но не ограничиваясь) гарантии</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; товарного состояния, пригодности для конкретной цели и отсутствия</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; нарушений прав третьих лиц. Ни при каких обстоятельствах автор</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; не несёт ответственности за любые претензии, убытки или иные</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; обязательства, возникшие в связи с использованием программы.</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Назначение:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;- декодирует внедрённую в текст картинку Base64 и сохраняет её в файл</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Пример использования: выделяем всё, что находится между двойными кавычками:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &quot;data:image/png;base64,iVBORw0KGgoAAAANSUh...абырвалг=&quot;</div><div class="code_line">--]]</div><div class="code_line">&nbsp;</div><div class="code_line">local checkImageFormat = function(format)</div><div class="code_line">&nbsp;&nbsp;local validFormats = {</div><div class="code_line">&nbsp;&nbsp; &nbsp;[&quot;image/png&quot;] = true,</div><div class="code_line">&nbsp;&nbsp; &nbsp;[&quot;image/jpeg&quot;] = true,</div><div class="code_line">&nbsp;&nbsp; &nbsp;[&quot;image/jpg&quot;] = true,</div><div class="code_line">&nbsp;&nbsp; &nbsp;[&quot;image/gif&quot;] = true,</div><div class="code_line">&nbsp;&nbsp; &nbsp;[&quot;image/bmp&quot;] = true,</div><div class="code_line">&nbsp;&nbsp; &nbsp;[&quot;image/webp&quot;] = true,</div><div class="code_line">&nbsp;&nbsp; &nbsp;[&quot;image/svg+xml&quot;] = true</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">&nbsp;&nbsp;return validFormats[format]</div><div class="code_line">end</div><div class="code_line">&nbsp;</div><div class="code_line">-------------------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">&nbsp;</div><div class="code_line">local isValidBase64 = function(str)</div><div class="code_line">&nbsp;&nbsp; &nbsp;local base64_chars = &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp;local padding_char = &quot;=&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- Проверка длины строки</div><div class="code_line">&nbsp;&nbsp; &nbsp;if #str % 4 ~= 0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return false</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- Проверка символов строки</div><div class="code_line">&nbsp;&nbsp; &nbsp;local padding_count = 0</div><div class="code_line">&nbsp;&nbsp; &nbsp;for i = 1, #str do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local char = str:sub(i, i)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if char == padding_char then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;padding_count = padding_count + 1</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;elseif not base64_chars:find(char, 1, true) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return false</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- Проверка символов заполнения</div><div class="code_line">&nbsp;&nbsp; &nbsp;if padding_count &#62; 2 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return false</div><div class="code_line">&nbsp;&nbsp; &nbsp;elseif padding_count &#62; 0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local last_char = str:sub(-1)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if last_char ~= padding_char or str:sub(-2, -2) == padding_char then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return false</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;return true</div><div class="code_line">end</div><div class="code_line">&nbsp;</div><div class="code_line">-------------------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">&nbsp;</div><div class="code_line">local base64_decode = function(input)</div><div class="code_line">&nbsp;&nbsp; &nbsp;local output = &quot;&quot;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;local base64_reverse_chars = {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[&quot;A&quot;]=0,[&quot;B&quot;]=1,[&quot;C&quot;]=2,[&quot;D&quot;]=3,[&quot;E&quot;]=4,[&quot;F&quot;]=5,[&quot;G&quot;]=6,[&quot;H&quot;]=7,[&quot;I&quot;]=8,[&quot;J&quot;]=9,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[&quot;K&quot;]=10,[&quot;L&quot;]=11,[&quot;M&quot;]=12,[&quot;N&quot;]=13,[&quot;O&quot;]=14,[&quot;P&quot;]=15,[&quot;Q&quot;]=16,[&quot;R&quot;]=17,[&quot;S&quot;]=18,[&quot;T&quot;]=19,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[&quot;U&quot;]=20,[&quot;V&quot;]=21,[&quot;W&quot;]=22,[&quot;X&quot;]=23,[&quot;Y&quot;]=24,[&quot;Z&quot;]=25,[&quot;a&quot;]=26,[&quot;b&quot;]=27,[&quot;c&quot;]=28,[&quot;d&quot;]=29,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[&quot;e&quot;]=30,[&quot;f&quot;]=31,[&quot;g&quot;]=32,[&quot;h&quot;]=33,[&quot;i&quot;]=34,[&quot;j&quot;]=35,[&quot;k&quot;]=36,[&quot;l&quot;]=37,[&quot;m&quot;]=38,[&quot;n&quot;]=39,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[&quot;o&quot;]=40,[&quot;p&quot;]=41,[&quot;q&quot;]=42,[&quot;r&quot;]=43,[&quot;s&quot;]=44,[&quot;t&quot;]=45,[&quot;u&quot;]=46,[&quot;v&quot;]=47,[&quot;w&quot;]=48,[&quot;x&quot;]=49,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[&quot;y&quot;]=50,[&quot;z&quot;]=51,[&quot;0&quot;]=52,[&quot;1&quot;]=53,[&quot;2&quot;]=54,[&quot;3&quot;]=55,[&quot;4&quot;]=56,[&quot;5&quot;]=57,[&quot;6&quot;]=58,[&quot;7&quot;]=59,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[&quot;8&quot;]=60,[&quot;9&quot;]=61,[&quot;+&quot;]=62,[&quot;/&quot;]=63</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- Убираем все = с конца</div><div class="code_line">&nbsp;&nbsp; &nbsp;input = input:gsub(&quot;=*$&quot;, &quot;&quot;)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;local input_length = #input</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;for i = 1, input_length, 4 do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local c1 = input:sub(i, &nbsp; i)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local c2 = input:sub(i+1, i+1)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local c3 = input:sub(i+2, i+2)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local c4 = input:sub(i+3, i+3)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local b1 = base64_reverse_chars[c1] or 0</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local b2 = base64_reverse_chars[c2] or 0</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local b3 = base64_reverse_chars[c3] or 0</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local b4 = base64_reverse_chars[c4] or 0</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local byte1 = bit.bor(bit.lshift(b1, 2), bit.rshift(b2, 4))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local byte2 = bit.bor(bit.lshift(bit.band(b2, 0x0F), 4), bit.rshift(b3, 2))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;local byte3 = bit.bor(bit.lshift(bit.band(b3, 0x03), 6), b4)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;output = output .. string.char(byte1)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if c3 ~= &quot;&quot; then output = output .. string.char(byte2) end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if c4 ~= &quot;&quot; then output = output .. string.char(byte3) end</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;return output</div><div class="code_line">end</div><div class="code_line">&nbsp;</div><div class="code_line">-------------------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">&nbsp;</div><div class="code_line">local DecodeBase64Image = function ()</div><div class="code_line">&nbsp;&nbsp;local ei = editor.GetInfo(nil)</div><div class="code_line">&nbsp;&nbsp;if ei.BlockType == 0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp;far.Message(&quot;Блок не выделен и декодировать нечего!&quot;, &quot;Ошибка&quot;, nil, &quot;w&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;return</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;local selectedText = Editor.SelValue</div><div class="code_line">&nbsp;&nbsp;-- Проверка формата изображения</div><div class="code_line">&nbsp;&nbsp;local format = selectedText:match(&quot;^data:([+%a/]+);base64,&quot;)</div><div class="code_line">&nbsp;&nbsp;if not format or not checkImageFormat(format) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; far.Message(&quot;Выделенный блок не содержит информации об изображении&quot;, &quot;Ошибка&quot;, nil, &quot;w&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; return</div><div class="code_line">&nbsp;&nbsp;end </div><div class="code_line">&nbsp;&nbsp;-- Проверка валидности кодированной информации</div><div class="code_line">&nbsp;&nbsp;local encodedImage = selectedText:match(&quot;;base64,(.*)&quot;)</div><div class="code_line">&nbsp;&nbsp;if not encodedImage or not &nbsp;isValidBase64(encodedImage) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; far.Message(&quot;Выделенный блок содержит некорректную информацию об изображении&quot;, &quot;Ошибка&quot;, nil, &quot;w&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; return</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;-- Запрос имени файла</div><div class="code_line">&nbsp;&nbsp;local filePath = far.InputBox(nil, &quot;Сохранение изображения&quot;, &quot;Введите имя файла:&quot;, nil, nil, 128, nil, 0)</div><div class="code_line">&nbsp;&nbsp;if not filePath or filePath == &quot;&quot; then</div><div class="code_line">&nbsp;&nbsp; &nbsp;return</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;-- Декодирование и сохранение изображения</div><div class="code_line">&nbsp;&nbsp;local decodedImage = base64_decode(encodedImage)</div><div class="code_line">&nbsp;&nbsp;local fileExtension = format:match(&quot;image/(%a+)&quot;)</div><div class="code_line">&nbsp;&nbsp;local fullPath = filePath .. &quot;.&quot; .. fileExtension</div><div class="code_line">&nbsp;&nbsp;if win.GetFileInfo(fullPath) then</div><div class="code_line">&nbsp;&nbsp; &nbsp;local overwrite = far.Message(&quot;Файл уже существует. Перезаписать?&quot;, &quot;Вопрос&quot;, &quot;;YesNo&quot;, &quot;w&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;if overwrite ~= 1 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; return</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;local file = io.open(fullPath, &quot;wb&quot;)</div><div class="code_line">&nbsp;&nbsp;if file then</div><div class="code_line">&nbsp;&nbsp; &nbsp;file:write(decodedImage)</div><div class="code_line">&nbsp;&nbsp; &nbsp;file:close()</div><div class="code_line">&nbsp;&nbsp; &nbsp;far.Message(&quot;Изображение сохранено успешно!&quot;, &quot;Успех&quot;)</div><div class="code_line">&nbsp;&nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp;far.Message(&quot;Не удалось сохранить изображение&quot;, &quot;Ошибка&quot;, nil, &quot;w&quot;)</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">end</div><div class="code_line">&nbsp;</div><div class="code_line">-------------------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">&nbsp;</div><div class="code_line">Macro {</div><div class="code_line">&nbsp;&nbsp;area=&quot;Editor&quot;; key=&quot;CtrlAltI&quot;; flags=&quot;&quot;; description=&quot;Save Image from Base64 line&quot;; action = function()</div><div class="code_line">&nbsp;&nbsp;DecodeBase64Image()</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">}</div></ol></div></div></div></div></div></div><br>
ЗЫ: Валидацию самого сохраняемого изображения я не делал. Выделяйте блок аккуратно и правильно  ;)]]></description>
        <author>Majestio</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932419</guid>
        <pubDate>Sun, 30 Nov 2025 06:54:01 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3932419</link>
        <description><![CDATA[Majestio: <s class='tag-s'><span class='tag-size' data-value='14' style='font-size:14pt;'>Хозяйке на заметку: отступы во встроенном редакторе Far</span><br>
<br>
Может кому и пригодиться... Как говорится &quot;мопед не мой&quot;. Пришлось знатно переписать скрипт, так как оригинальный постоянно съедал последнюю строку. Сегодня меня это уже достало&#33;<br>
<br>
<strong class='tag-b'>Shift+Tab</strong> - сдвигает выделенный потоковый блок вправо<br>
<strong class='tag-b'>Shift+BS</strong> - сдвигает выделенный потоковый блок влево</s><br>
<br>
<strong class='tag-b'><span class="tag-color tag-color-named" data-value="red" style="color: red">УПС: Есть баги&#33; Буду дорабатывать  &gt;:( </span></strong><br>
<br>
Макро ложить вот сюда: <span class="tag-color tag-color-named" data-value="blue" style="color: blue">%FARHOME%&#092;Profile&#092;Macros&#092;scripts&#092;BlockIndent</span> (ну или где у вас там хранится, может в профилях пользователя венды)<br>
<br>
<div class="tag-spoiler spoiler closed"><div class="spoiler_header" onclick="openCloseParent(this)">Скрытый текст</div><div class="body"><strong class='tag-b'>BlockIndent.lua</strong><br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">--[[</div><div class="code_line">&nbsp;&nbsp;Block Indent for Far Manager</div><div class="code_line">&nbsp;&nbsp;Version: 2.2</div><div class="code_line">&nbsp;&nbsp; &nbsp;Copyright (C) 2001 Alex Yaroslavsky</div><div class="code_line">&nbsp;&nbsp; &nbsp;Copyright (C) 2025 Majestio (fixxxx)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;This program is free software; you can redistribute it and/or modify</div><div class="code_line">&nbsp;&nbsp; &nbsp;it under the terms of the GNU General Public License as published by</div><div class="code_line">&nbsp;&nbsp; &nbsp;the Free Software Foundation; either version 2 of the License, or</div><div class="code_line">&nbsp;&nbsp; &nbsp;(at your option) any later version.</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;This program is distributed in the hope that it will be useful,</div><div class="code_line">&nbsp;&nbsp; &nbsp;but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class="code_line">&nbsp;&nbsp; &nbsp;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &nbsp;See the</div><div class="code_line">&nbsp;&nbsp; &nbsp;GNU General Public License for more details.</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;You should have received a copy of the GNU General Public License</div><div class="code_line">&nbsp;&nbsp;along with this program; if not, write to the Free Software</div><div class="code_line">&nbsp;&nbsp; &nbsp;Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA &nbsp;02111-1307 &nbsp;USA</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;Features:</div><div class="code_line">&nbsp;&nbsp;- Right or Left Indentation of the selected block (or the &nbsp;current &nbsp;line) &nbsp;by</div><div class="code_line">&nbsp;&nbsp; &nbsp;a tab or a space.</div><div class="code_line">&nbsp;&nbsp;- Each line in the block is indented relatively to its own position &nbsp;with &nbsp;no</div><div class="code_line">&nbsp;&nbsp; &nbsp;respect to other lines in the block.</div><div class="code_line">&nbsp;&nbsp;- Tab indentation as in Borland Turbo IDE, text is indented &nbsp;to &nbsp;the &nbsp;nearest</div><div class="code_line">&nbsp;&nbsp; &nbsp;tab position and not just by tab size.</div><div class="code_line">&nbsp;&nbsp;- Works correctly with any editor settings (expand tabs or not, inserts &nbsp;real</div><div class="code_line">&nbsp;&nbsp; &nbsp;tabs).</div><div class="code_line">--]]</div><div class="code_line">&nbsp;</div><div class="code_line">local function Indent(IndentByTabSize, Forward)</div><div class="code_line">&nbsp;&nbsp;local F = far.Flags</div><div class="code_line">&nbsp;&nbsp;local ei = editor.GetInfo()</div><div class="code_line">&nbsp;&nbsp;if not ei then return end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;local hasBlock = (ei.BlockType == F.BTYPE_STREAM or ei.BlockType == F.BTYPE_COLUMN) and ei.BlockStartLine</div><div class="code_line">&nbsp;&nbsp;local startLine = hasBlock and ei.BlockStartLine or ei.CurLine</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;editor.UndoRedo(nil, F.EUR_BEGIN)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;if hasBlock then</div><div class="code_line">&nbsp;&nbsp; &nbsp;if ei.BlockType == F.BTYPE_STREAM then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;-- Принудительно делаем выделение &quot;до конца окна&quot; на всех строках блока</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;editor.Select(nil, &quot;BTYPE_STREAM&quot;, ei.BlockStartLine, 1, -1, ei.TotalLines)</div><div class="code_line">&nbsp;&nbsp; &nbsp;elseif ei.BlockType == F.BTYPE_COLUMN then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;-- Для вертикального блока — просто расширяем до конца файла</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;editor.Select(nil, &quot;BTYPE_COLUMN&quot;, ei.BlockStartLine, ei.BlockStartCol,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ei.TotalLines - ei.BlockStartLine + 1, ei.BlockWidth)</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;local IndentSize = IndentByTabSize and ei.TabSize or 1</div><div class="code_line">&nbsp;&nbsp;local IndentChar = IndentByTabSize and &quot;\t&quot; or &quot; &quot;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;local line = startLine</div><div class="code_line">&nbsp;&nbsp;while true do</div><div class="code_line">&nbsp;&nbsp; &nbsp;local s = editor.GetString(nil, line, 0)</div><div class="code_line">&nbsp;&nbsp; &nbsp;if not s then break end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;local inBlock = not hasBlock</div><div class="code_line">&nbsp;&nbsp; &nbsp;if hasBlock then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;local ss = s.SelStart or 0</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;local se = s.SelEnd or 0</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;inBlock = (ss &#62; 0) and (se == -1 or ss &#60;= se)</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if not inBlock then break end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;local text = s.StringText or &quot;&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp;local firstNonSpace = text:find(&quot;[^ \t]&quot;) or (#text + 1)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;local tabCol = editor.RealToTab(nil, line, firstNonSpace) - 1</div><div class="code_line">&nbsp;&nbsp; &nbsp;local steps = math.floor(tabCol / IndentSize)</div><div class="code_line">&nbsp;&nbsp; &nbsp;if not Forward and (tabCol % IndentSize) == 0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;steps = steps - 1</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;steps = math.max(0, Forward and steps + 1 or steps)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- Удаляем старый отступ</div><div class="code_line">&nbsp;&nbsp; &nbsp;editor.SetString(nil, line, text:sub(firstNonSpace), s.StringEOL)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- Вставляем новый</div><div class="code_line">&nbsp;&nbsp; &nbsp;editor.SetPosition(nil, line, 1)</div><div class="code_line">&nbsp;&nbsp; &nbsp;for i = 1, steps do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;editor.InsertText(nil, IndentChar)</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;line = line + 1</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;-- Восстанавливаем курсор</div><div class="code_line">&nbsp;&nbsp;editor.SetPosition(nil, ei)</div><div class="code_line">&nbsp;&nbsp;editor.Redraw()</div><div class="code_line">&nbsp;&nbsp;editor.UndoRedo(nil, F.EUR_END)</div><div class="code_line">end</div><div class="code_line">&nbsp;</div><div class="code_line">Macro {</div><div class="code_line">&nbsp;&nbsp;area=&quot;Editor&quot;; key=&quot;ShiftTab&quot;; flags=&quot;&quot;; description=&quot;Indent right by space&quot;; action = function()</div><div class="code_line">&nbsp;&nbsp; &nbsp;Indent(false, true)</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">Macro {</div><div class="code_line">&nbsp;&nbsp;area=&quot;Editor&quot;; key=&quot;ShiftBS&quot;; flags=&quot;&quot;; description=&quot;Indent left by space&quot;; action = function()</div><div class="code_line">&nbsp;&nbsp; &nbsp;Indent(false, false)</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">NoMacro {</div><div class="code_line">&nbsp;&nbsp;area=&quot;Editor&quot;; key=&quot;&quot;; flags=&quot;&quot;; description=&quot;Indent right by tab size&quot;; action = function()</div><div class="code_line">&nbsp;&nbsp; &nbsp;Indent(true, true)</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">NoMacro {</div><div class="code_line">&nbsp;&nbsp;area=&quot;Editor&quot;; key=&quot;&quot;; flags=&quot;&quot;; description=&quot;Indent left by tab size&quot;; action = function()</div><div class="code_line">&nbsp;&nbsp; &nbsp;Indent(true, false)</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">}</div></ol></div></div></div></div><br>
</div></div>]]></description>
        <author>Majestio</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927345</guid>
        <pubDate>Fri, 22 Aug 2025 19:57:26 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927345</link>
        <description><![CDATA[Qraizer: У кого его нет:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">@echo off</div><div class="code_line">&nbsp;</div><div class="code_line">setlocal</div><div class="code_line">set var=%path%</div><div class="code_line">:onceMore</div><div class="code_line">&nbsp;</div><div class="code_line">for /f &quot;tokens=1,* delims=;&quot; %%a in (&quot;%var%&quot;) do (</div><div class="code_line">&nbsp;&nbsp;echo %%a</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;set var=%%b</div><div class="code_line">&nbsp;&nbsp;goto onceMore</div><div class="code_line">)</div><div class="code_line">endlocal</div></ol></div></div></div></div>]]></description>
        <author>Qraizer</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927279</guid>
        <pubDate>Thu, 21 Aug 2025 16:48:53 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927279</link>
        <description><![CDATA[Majestio: <span class='tag-size' data-value='14' style='font-size:14pt;'>Хозяйке на заметку: удобочитаемая распечатка PATH</span><br>
<br>
Может кому и пригодиться...<br>
<br>
Так бывает, что при &quot;задействовании&quot; очередного пакета, требующего изменение системного параметра <strong class='tag-b'>PATH</strong>, уже теряется &quot;понимание&quot; содержимого этой переменной. Ибо путей уже over дохера...<br>
Мой солюшен это решает - он позволяет вывести содержимое переменной <strong class='tag-b'>поэлементно и в столбец</strong>. <br>
<br>
Для этого делаем пункт в меню Фар, вызываемом по [F2], допустим &quot;Смотрим пути&quot;. В качестве горячей клавиши что угодно, а можно и без нее. А в качестве команды что-то типа:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">path | E:\Tools\MSys64\usr\bin\sed -e &#39;s/;/\n/g&#39;</div></ol></div></div></div></div> <br>
И получаем что-то типа на выводе в консоль:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">E:\Documents.Projects&#62;path | E:\Tools\MSys64\usr\bin\sed -e &#39;s/;/\n/g&#39;</div><div class="code_line">C:\Tools\Perl-5.40.0-x64\c\bin</div><div class="code_line">C:\Tools\Perl-5.40.0-x64\perl\site\bin</div><div class="code_line">C:\Program Files\Common Files\Oracle\Java\javapath</div><div class="code_line">C:\Program Files (x86)\VMware\VMware Workstation\bin\</div><div class="code_line">C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler</div><div class="code_line">C:\Program Files (x86)\Common Files\Intel\Shared Files\cpp\bin\Intel64</div><div class="code_line">C:\Tools\Python310\</div><div class="code_line">C:\Tools\Python310\Scripts\</div><div class="code_line">C:\Tools\Prolog\bin</div><div class="code_line">C:\Tools\ImageMagick</div><div class="code_line">C:\Program Files\dotnet\</div><div class="code_line">C:\WINDOWS\system32</div><div class="code_line">C:\WINDOWS</div><div class="code_line">C:\WINDOWS\System32\Wbem</div><div class="code_line">C:\WINDOWS\System32\WindowsPowerShell\v1.0\</div><div class="code_line">C:\WINDOWS\System32\OpenSSH\</div><div class="code_line">C:\Tools\gs\bin</div><div class="code_line">D:\Tools\SDK-Flutter\bin</div><div class="code_line">C:\Program Files\Java\jdk-17\bin</div><div class="code_line">C:\Program Files\nodejs\</div><div class="code_line">C:\Tools\Git\cmd</div><div class="code_line">D:\Tools\Topaz Gigapixel AI\bin\</div><div class="code_line">C:\Program Files\Calibre2\</div><div class="code_line">D:\Tools\OpenServer\bin</div><div class="code_line">C:\Users\Majestio\AppData\Local\ValidatorBuddy</div><div class="code_line">C:\Users\Majestio\AppData\Local\Microsoft\WindowsApps</div><div class="code_line">C:\Users\Majestio\AppData\Roaming\Programs\Zero Install</div><div class="code_line">C:\Users\Majestio\AppData\Roaming\npm</div></ol></div></div></div></div><br>
Одна &quot;беда&quot; - нужно иметь установленным <a class='tag-url' href='https://www.msys2.org' target='_blank'>MSYS2</a>. В моём случае в  <strong class='tag-b'>E:&#092;Tools&#092;MSys64</strong>]]></description>
        <author>Majestio</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927187</guid>
        <pubDate>Wed, 20 Aug 2025 13:05:45 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927187</link>
        <description><![CDATA[Qraizer: Я ж об этом. Сорри, непонятно выразился. Я использовал что-то типа<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">rem Время запуска</div><div class="code_line">for /f %%a in (&#39;date /t&#39;) do set curdate=%%a</div><div class="code_line">for /f %%a in (&#39;time /t&#39;) do set curtime=%%a</div><div class="code_line">echo: &#62;&#62;&#62; %~dp0runlog.txt</div><div class="code_line">echo ----------------------------------------------------------------------------------- &#62;&#62;&#62; %~dp0runlog.txt</div><div class="code_line">echo %curdate% %curtime%: run started &#62;&#62;&#62; %~dp0runlog.txt</div><div class="code_line">echo ----------------------------------------------------------------------------------- &#62;&#62;&#62; %~dp0runlog.txt</div></ol></div></div></div></div>а про наличие переменных запамятовал напрочь.]]></description>
        <author>Qraizer</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927127</guid>
        <pubDate>Wed, 20 Aug 2025 04:35:21 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927127</link>
        <description><![CDATA[Akina: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=418325&view=findpost&p=3927125'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Qraizer &#064; <time class="tag-quote__quoted-time" datetime="2025-08-19T20:33:25+00:00">19.08.25, 20:33</time></span><div class='quote '>Никак не смог заставить возвращать секунды.</div></div><br>
?? %TIME% возвращает секунды с точностью до сотых...]]></description>
        <author>Akina</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927125</guid>
        <pubDate>Tue, 19 Aug 2025 20:33:25 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927125</link>
        <description><![CDATA[Qraizer: Нужна была подобная функциональность для ведения логов. Никак не смог заставить возвращать секунды.]]></description>
        <author>Qraizer</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927114</guid>
        <pubDate>Tue, 19 Aug 2025 12:45:21 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3927114</link>
        <description><![CDATA[Majestio: <span class='tag-size' data-value='14' style='font-size:14pt;'>Хозяйке на заметку: временнЫе штампы</span><br>
<br>
Может кому и пригодиться...<br>
<br>
Моя шляпа позволяет в начало имени файла или каталога вставлять дату-время. Спросите &quot;зачем это надо&quot;. А-б-и-с-ь-н-я-ю&#33; Очень удобно иметь список файлов и каталогов, отсортированных по имени (а по факту по дате-времени) не меняя порядок сортировки в самом ФАРе. Особенно прекрасно это ощущается в каталогах резервных копий - просто душа дятлом поёт&#33;&#33;&#33;<br>
<br>
Т.е. делаете просто файл или каталог под именем &quot;1&quot;, травите на него команду и получаете к примеру &quot;2025.08.19-15.43.56_1&quot;. Осталось только при переименовании убрать последних два символа, если нужен просто временной штамп.<br>
<br>
<span class='tag-size' data-value='12' style='font-size:12pt;'><span class="tag-color tag-color-named" data-value="navy" style="color: navy">⭐ Солюшен</span></span><br>
<br>
1) В самом ФАРе делаете очередной пункт меню в его меню, вызываемом по [F2], допустим &quot;Вставить временной штамп&quot;<br>
2) В качестве горячей клавиши что угодно, а можно и без нее. А в качестве команды что-то типа <span class="tag-color tag-color-named" data-value="blue" style="color: blue">C:&#092;Tools&#092;set-timestamp.cmd &quot;&#33;.&#33;&quot;</span>, ну или ваш варик<br>
<br>
В качестве командного файла:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">@echo off</div><div class="code_line">SET HOUR=%TIME:~0,2%</div><div class="code_line">SET STAMP=%date:~6,4%.%date:~3,2%.%date:~0,2%-%HOUR: =0%.%TIME:~3,2%.%TIME:~6,2%</div><div class="code_line">SET FOLDER=%STAMP::=-%</div><div class="code_line">SET FILE=%1</div><div class="code_line">SET FILE=%FILE:~1,-1%</div><div class="code_line">ren %1 &quot;%FOLDER%_%FILE%&quot;</div></ol></div></div></div></div><br>
 :victory:]]></description>
        <author>Majestio</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912810</guid>
        <pubDate>Thu, 07 Nov 2024 04:28:48 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912810</link>
        <description><![CDATA[Славян: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=418325&view=findpost&p=3912808'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Qraizer &#064; <time class="tag-quote__quoted-time" datetime="2024-11-06T19:33:04+00:00">06.11.24, 19:33</time></span><div class='quote '>Тебе бы понравилось, если файлы с именами из латиницы+кириллицы сортировались на основе хрен пойми чего вместо национальных правил?</div></div>1. Хочется пример этого &quot;хрен пойми чего&quot;, дабы не на эмоциях рассуждать, а по логике.<br>
2. Думаю, что понравилось бы, несмотря на местами встречавшийся порядок &quot;ЁЈАБВ...&quot;, т.к. логика абсолютна.]]></description>
        <author>Славян</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912808</guid>
        <pubDate>Wed, 06 Nov 2024 19:33:04 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912808</link>
        <description><![CDATA[Qraizer: Это не разрабы, это правила юникода. Тебе бы понравилось, если файлы с именами из латиницы+кириллицы сортировались на основе хрен пойми чего вместо национальных правил? и заметь, кириллица не обязательно означает русский,  как и латиница не обязательно английский, французы с немцами тебе это подтвердят, а уж турки так вообще.]]></description>
        <author>Qraizer</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912798</guid>
        <pubDate>Wed, 06 Nov 2024 14:56:43 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912798</link>
        <description><![CDATA[Славян: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=418325&view=findpost&p=3912311'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Qraizer &#064; <time class="tag-quote__quoted-time" datetime="2024-10-28T18:53:47+00:00">28.10.24, 18:53</time></span><div class='quote '>Так он сортирует по одному указанному критерию. По другим критериям никаких гарантий какого-либо порядка. Тебе же нужно два критерия одновременно.</div></div>Частично. Указывая сортировать по расширению, он группирует мои *.txt-файлы, это так. Но далее меня б более чем устроила сортировка по коду символа (в некоем смысле это очевидный порядок), но разрабы зачек-то замутили ещё какой-то смысл в дальнейшем упорядочении. Эх...]]></description>
        <author>Славян</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912527</guid>
        <pubDate>Thu, 31 Oct 2024 16:51:40 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912527</link>
        <description><![CDATA[Qraizer: В общем, это был непростой процесс. Даже на виртуалке под современными процессорами 98-я не работает должным образом. Пришлось искать патчи. Но это уже был не просто спортивный интерес, это было дело принципа. Нашёл образ, нашёл патчи, нашёл ключ активации, проинсталил, нашёл, как и чем собрать под Win98. Greater. Ну кто б сомневался.]]></description>
        <author>Qraizer</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912446</guid>
        <pubDate>Wed, 30 Oct 2024 18:55:38 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912446</link>
        <description><![CDATA[Qraizer: В общем, разгадка на поверхности, хотя и не так уж очевидна. CompareString() же выполняет лексикографическое сравнение с учётом национальных предпочтений. Это очевидно. А вот что не так уж, так это то, что &#39;-&#39; ассоциируется с дефисами и тире, в частности переносами, как явными, так и мягкими. Ну и лексикографически они располагаются перед разделителями, типа там пробел, таб итп, т.к. по сравнению с ними должны иметь меньший вес.<br>Я заглянул в 7-ку, там такое же поведение. Даже поставил XPю на виртуалку и заморочился пакетом её поддержки в Студии, что собрать под неё. И в ней тоже Greater. Осталось только ради интереса чекнуть 98SE, но это VS6 расчехлять... ну так мы тут крутые парни или зумеры ленивые]]></description>
        <author>Qraizer</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912380</guid>
        <pubDate>Tue, 29 Oct 2024 18:11:49 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912380</link>
        <description><![CDATA[macomics: Если интересно, то Calculate Linux 6.6.57 + wine (wine-9.20 (Staging) или wine-9.0 (Proton-9.0-2)) при установленной Windows 10 в префиксе выдают Greater.]]></description>
        <author>macomics</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912379</guid>
        <pubDate>Tue, 29 Oct 2024 17:12:47 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912379</link>
        <description><![CDATA[Qraizer: Впрочем, чушь это. Даже если включить сортировку по имени, всё равно тот же результат.<br>
Я порылся в FARовых сырцах, там всё упирается в CompareString() суть WinAPI. Проверил (основано на string_sort.cpp / compare_natural_base()):<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">#include &#60;windows.h&#62;</div><div class="code_line">#include &#60;iostream&#62;</div><div class="code_line">#include &#60;string&#62;</div><div class="code_line">#include &#60;map&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">std::string Str1 = &quot;a!&quot;;</div><div class="code_line">std::string Str2 = &quot;a-&quot;;</div><div class="code_line">&nbsp;</div><div class="code_line">int main()</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;auto Flags = LINGUISTIC_IGNORECASE | SORT_STRINGSORT;</div><div class="code_line">&nbsp;&nbsp;auto Result= CompareString(LOCALE_USER_DEFAULT, Flags, Str1.data(), static_cast&#60;int&#62;(Str1.size()), Str2.data(), static_cast&#60;int&#62;(Str2.size()));</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;std::cout &#60;&#60; [](int x){ return std::map&#60;int, std::string&#62;{{0, std::to_string(GetLastError())},</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{CSTR_LESS_THAN, &nbsp; &nbsp;&quot;Less&quot; &nbsp; },</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{CSTR_EQUAL, &nbsp; &nbsp; &nbsp; &nbsp;&quot;Equal&quot; &nbsp;},</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{CSTR_GREATER_THAN, &quot;Greater&quot;}}[x]; }(Result);</div><div class="code_line">}</div></ol></div></div></div></div><div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Greater</div></ol></div></div></div></div>Увы, это винда считает, что &#39;&#33;&#39; &gt; &#39;-&#39;. У кого есть возможность, проверьте, плз, на нерусской. Я пробовал указывать LOCALE_SYSTEM_DEFAULT, LOCALE_INVARIANT и даже явное 0x409 сиречь en-US. Всё равно Greater<br>
<br>
P.S. Если будет выдавать цифры, значит CompareString() вернула эррор, и это системный код ошибки last error]]></description>
        <author>Qraizer</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912311</guid>
        <pubDate>Mon, 28 Oct 2024 18:53:47 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912311</link>
        <description><![CDATA[Qraizer: Так он сортирует по одному указанному критерию. По другим критериям никаких гарантий какого-либо порядка. Тебе же нужно два критерия одновременно. Вроде было как-то у них на форуме обсуждение объединения нескольких критериев для создания своих правил, но к чему пришли, я не знаю. Мож плагин какой нарелизили.]]></description>
        <author>Qraizer</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912255</guid>
        <pubDate>Sun, 27 Oct 2024 18:55:11 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912255</link>
        <description><![CDATA[Славян: Да, по Ctrl-F7 (Несорт) стало сортировать нормально. Но это ж не выход, т.к. у меня всегда установлена сортировка по расширению. Непонятна причина, увы.]]></description>
        <author>Славян</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912254</guid>
        <pubDate>Sun, 27 Oct 2024 18:25:18 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912254</link>
        <description><![CDATA[macomics: По тыкайте Ctrl+F&lt;3-11&gt; и посмотрите разные варианты]]></description>
        <author>macomics</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912253</guid>
        <pubDate>Sun, 27 Oct 2024 17:48:58 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3912253</link>
        <description><![CDATA[Славян: Кто-то знает (может объяснить) отчего так:<br>
1. Создаю 3 файла: a-.txt, a&#33;.txt и a=.txt<br>
2. Они сортируются в Far&#39;е именно в таком порядке, но по коду символа должно быть: a&#33;.txt, a-.txt, a=.txt<br>
т.к. : код(&#33;)=&#036;21, код(-)=&#036;2D, код(=)=&#036;3D.<br>
<br>
Т.е. почему знак &#39;-&#39; столь важен стал? <br>
<br>
<span class="tag-color tag-color-named" data-value="mergepost" style="color: mergepost"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2024-10-27T17:54:58+00:00">27.10.24, 17:54</time></span></span><br>
П.С. вот запустил в NDN (Necro... DOS Navigator), там всё правильно&#33;<br>
И виндовый проводник сортирует как надо.]]></description>
        <author>Славян</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3848376</guid>
        <pubDate>Fri, 25 Jun 2021 09:22:11 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3848376</link>
        <description><![CDATA[Kopa: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=418325&view=findpost&p=3839762'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Qraizer &#064; <time class="tag-quote__quoted-time" datetime="2020-09-30T12:35:36+00:00">30.09.20, 12:35</time></span><div class='quote '>Я даже видел гика, что запускал FAR из-под вайна вместо MC в линухе.</div></div><br>
Мну сейчас запускает Far2 из под Wine 6.10 в рамках LiveCD Linux Puppy (пакет собранный взял из топика форума Puppy)<br>
<br>
P.S. После запуска Far2 через команду терминала: wine Far.exe<br>
дальше запускаю Total Commander, а через него повторно Far2 для получения графического вида гуи Fara :)<br>
<br>
Windows софт, запускаемый в рамках окружения Linux, зачастую показывает лучшую &quot;рабочесть&quot; чем в родной для него Windows&#33; <br>
и это приятно удивляет и при этом не требует гигабайт дискового пространства для установки Windows системы нативно или в VM (виртуальные машины)]]></description>
        <author>Kopa</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3839765</guid>
        <pubDate>Wed, 30 Sep 2020 14:21:37 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3839765</link>
        <description><![CDATA[vot: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=418325&view=findpost&p=3839762'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Qraizer &#064; <time class="tag-quote__quoted-time" datetime="2020-09-30T12:35:36+00:00">30.09.20, 12:35</time></span><div class='quote '>видел гика, что запускал FAR из-под вайна вместо MC в линухе.</div></div><br>
О, мсье знает толк в извращениях&#33;  :crazy:]]></description>
        <author>vot</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3839762</guid>
        <pubDate>Wed, 30 Sep 2020 12:35:36 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3839762</link>
        <description><![CDATA[Qraizer: Я даже видел гика, что запускал FAR из-под вайна вместо MC в линухе.]]></description>
        <author>Qraizer</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3839757</guid>
        <pubDate>Wed, 30 Sep 2020 10:37:50 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3839757</link>
        <description><![CDATA[JoeUser: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=418325&view=findpost&p=3839754'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Mr.Delphist &#064; <time class="tag-quote__quoted-time" datetime="2020-09-30T08:54:15+00:00">30.09.20, 08:54</time></span><div class='quote '>А вот FAR - это классический Norton, быстро и легко. Мультитул, у которого можно отстегнуть всё лишнее.</div></div><br>
Когда-то был более удачный вариант - Volkov Commander, типа Нортона - но гораздо шустрее и меньше хавал ресурсов.<br>
А на счет FAR&#39;а - полностью согласен. А если его запускать под <a class='tag-url' href='https://conemu.ru/ru/' target='_blank'>ConEmu</a>, то еще добавляется мешок сахара.]]></description>
        <author>JoeUser</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3839754</guid>
        <pubDate>Wed, 30 Sep 2020 08:54:15 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3839754</link>
        <description><![CDATA[Mr.Delphist: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=418325&view=findpost&p=3832736'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>... &#064; <time class="tag-quote__quoted-time" datetime="2020-06-18T10:49:30+00:00">18.06.20, 10:49</time></span><div class='quote '>А чем он лучше Total Commander-a ?</div></div><br>
Total - это как DOS Navigator: швейцарский нож, уже не помещающийся в руку из-за неудобной толщины.<br>
<br>
А вот FAR - это классический Norton, быстро и легко. Мультитул, у которого можно отстегнуть всё лишнее.]]></description>
        <author>Mr.Delphist</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3832739</guid>
        <pubDate>Thu, 18 Jun 2020 11:34:21 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3832739</link>
        <description><![CDATA[JoeUser: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=418325&view=findpost&p=3832736'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>... &#064; <time class="tag-quote__quoted-time" datetime="2020-06-18T10:49:30+00:00">18.06.20, 10:49</time></span><div class='quote '>А чем он лучше Total Commander-a ?</div></div><br>
Три преимущества (ну на вкус и цвет):<br>
<br>
* удобная работа с консольными программами<br>
* встроенный быстрый редактор, который как и сам Фар можно обвесить плагинами<br>
* уже давно подключили поддержку Lua, с нативными плагинами можно не париться]]></description>
        <author>JoeUser</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3832736</guid>
        <pubDate>Thu, 18 Jun 2020 10:49:30 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3832736</link>
        <description><![CDATA[...: А чем он лучше Total Commander-a ?]]></description>
        <author>...</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3829262</guid>
        <pubDate>Sun, 26 Apr 2020 00:47:08 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3829262</link>
        <description><![CDATA[JoeUser: <span class='tag-size' data-value='14' style='font-size:14pt;'><strong class='tag-b'>Lua-скрипт EditorTools</strong></span><br>
<br>
Позволяет подключать и исполнять в редакторе Far&#39;а различные обработчики - фильтры, компиляторы, интерпретаторы. Исполнять их без отрытия дополнительных окон, отлавливать stdout и stdrr, загружать результаты обработки назад в редактор, выводить сообщения об ошибках и результатах обработки в виде диалогов. Возможно кому-то пригодится.<br>
<br>
<strong class='tag-b'>Предыстория</strong><br>
<br>
Для быстрого редактирования файлов - встроенный редактор Far&#39;а просто прекрасен. Но, к сожалению, определенных функций в нем не хватает. Конечно можно, при наличии времени и сил, сесть и написать свой инструмент обработки в виде полноценного плагина, либо Lua-скрипта. Меня же заинтересовал чисто практический вопрос - найти способ подключения уже готовых инструментов не через подсистему ассоциаций файлов. Надоело сохраняться, обрабатывать файл, потом опять грузить файл в редактор. Ну и вот родилась идея создать более-менее универсальное средство. <br>
<br>
Прошу учесть - это моя первая программа на языке Lua, так что принимайте мой отказ от ответственности, еличе :D<br>
<br>
На момент написания скрипта мне нужно было подключить:<br>
<br>
<ul class="tag-list"><li>Форматер С++ кода <a class='tag-url' href='http://astyle.sourceforge.net/' target='_blank'>AStyle</a></li><li>Форматер <a class='tag-url' href='https://www.html-tidy.org/' target='_blank'>HTML5 Tidy</a></li><li>Компилятор Fasm</li><li>Интерпретатор Perl</li><li>Интерпретатор Ruby</li><li>Интерпретатор SWI-Prolog</li></ul><br>
<strong class='tag-b'>Функионал</strong><br>
<br>
Команды обработки прописываются в файл конфигурации EditorTools.conf, который лежит рядом с макросом. <br>
Программы могут работать в четырех режимах:<br>
<br>
1) Filter<br>
Используется для запуска программ, которые могут непосредственно вносить изменения в файл.<br>
После выполнения содержимое редактора заменяется результатом обработки<br>
<br>
2) Pipe<br>
Используется для запуска программ, которые могут читать и обрабатывать файл, но вывод умеют делать только в STDOUT<br>
После выполнения содержимое редактора заменяется результатом обработки<br>
<br>
3) Compiler<br>
Используется для запуска компиляторов<br>
После выполнения выводится диалог об успешной компиляции, либо диалог, содержащий ошибки компилятора<br>
<br>
4) Execute<br>
Используется для запуска как правило интерпретаторов<br>
После выполнения выводится диалог, в котором отображается результат обрабтки текста внешней программой<br>
<br>
<strong class='tag-b'>Скрипт EditorTools.lua</strong><br>
<div class="tag-spoiler spoiler closed"><div class="spoiler_header" onclick="openCloseParent(this)">Скрытый текст</div><div class="body"><br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">-- Скрипт EditorTools v.1.1</div><div class="code_line">-- подключение внешних инструментов в редакторе Far&#39;а </div><div class="code_line">--</div><div class="code_line">-- 2020 (C) Автор Majestio aka JoeUser</div><div class="code_line">--</div><div class="code_line">-- http://majestio.info</div><div class="code_line">--</div><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">-- local inspect = require(&#39;inspect&#39;)</div><div class="code_line">local ScriptName = ...</div><div class="code_line">local EOPT_BOM = 0x00000200</div><div class="code_line">local BTYPE_STREAM = 1</div><div class="code_line">local SW_HIDE = 0</div><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">local EditorTools = function ()</div><div class="code_line">&nbsp;&nbsp;local CurPath = mf.fsplit(ScriptName,3)</div><div class="code_line">&nbsp;&nbsp;local ConfigName = ScriptName:gsub(&quot;[^.]+$&quot;,&quot;conf&quot;)</div><div class="code_line">&nbsp;&nbsp;local Conf = io.open(ConfigName,&quot;r&quot;)</div><div class="code_line">&nbsp;&nbsp;-- читаем файл конфигурации ------------------------------------------------------------------------------------------</div><div class="code_line">&nbsp;&nbsp;if Conf == nil then </div><div class="code_line">&nbsp;&nbsp; &nbsp;far.Message(&#39;Файл конфигурации нельзя прочесть!&#39;, &#39;Ошибка&#39;, &#39;;Ok&#39;, &#39;w&#39;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;return</div><div class="code_line">&nbsp;&nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp;local Cmd = {}</div><div class="code_line">&nbsp;&nbsp; &nbsp;local Idx = 1</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- разбираем файл конфигурации на список &quot;инструментов&quot; ------------------------------------------------------------</div><div class="code_line">&nbsp;&nbsp; &nbsp;for line in Conf:lines() do </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if regex.match(line,&#39;^(F|P|C|E)&#39;) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;for w1,w2,w3 in regex.gmatch(line, &quot;^(F|P|C|E)\s*,\s*&#39;\s*([^&#39;]+?)\s*&#39;\s*,\s*&#39;\s*([^&#39;]+?)\s*&#39;\s*$&quot;) do </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Cmd[Idx] = {w1,w2,w3}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Idx = Idx + 1</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;Conf:close() &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- формируем и выводим диалог выбора &quot;инструментов&quot; ----------------------------------------------------------------</div><div class="code_line">&nbsp;&nbsp; &nbsp;local Choice = &#39;&#39; </div><div class="code_line">&nbsp;&nbsp; &nbsp;for Idx = 1, #Cmd do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;Choice = Choice..Cmd[Idx][2]..&#39;\n&#39;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;local ChoiceIdx = Menu.Show(Choice, nil, 8+0x200)</div><div class="code_line">&nbsp;&nbsp; &nbsp;if ChoiceIdx == 0 then return end</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- формируем имя временного файла для сброса содержимого редактора -------------------------------------------------</div><div class="code_line">&nbsp;&nbsp; &nbsp;math.randomseed(os.time())</div><div class="code_line">&nbsp;&nbsp; &nbsp;local RndNumber = math.random(1000)</div><div class="code_line">&nbsp;&nbsp; &nbsp;local EditorFullName = editor.GetFileName()</div><div class="code_line">&nbsp;&nbsp; &nbsp;local EditorFilePath = regex.match(EditorFullName,&quot;^(.+\\).+$&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;local EditorFileName = regex.match(EditorFullName,&quot;^.+\\([^\.]+)\.*.*$&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;local EditorFileExt = regex.match(EditorFullName,&quot;^.+?\.([^\.]+)$&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;if EditorFileExt == nil then EditorFileExt = &quot;&quot; end</div><div class="code_line">&nbsp;&nbsp; &nbsp;local TmpName = EditorFilePath..EditorFileName..&#39;-tmp-&#39;..RndNumber..&#39;.&#39;..EditorFileExt</div><div class="code_line">&nbsp;&nbsp; &nbsp;local OutName = EditorFilePath..EditorFileName..&#39;-tmp-&#39;..RndNumber..&#39;.&#39;..&quot;out&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp;local ResName = EditorFilePath..EditorFileName..&#39;-tmp-&#39;..RndNumber..&#39;.&#39;..&quot;res&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp;local ErrName = EditorFilePath..EditorFileName..&#39;-tmp-&#39;..RndNumber..&#39;.&#39;..&quot;err&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- в командной строке производим замены в плэйсхолдерах ------------------------------------------------------------</div><div class="code_line">&nbsp;&nbsp; &nbsp;local CmdName = regex.gsub(Cmd[ChoiceIdx][3],&quot;%p&quot;,EditorFilePath) -- %p на значение EditorFilePath</div><div class="code_line">&nbsp;&nbsp; &nbsp;CmdName = regex.gsub(CmdName,&quot;%n&quot;,EditorFileName) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -- %n на значение EditorFileName</div><div class="code_line">&nbsp;&nbsp; &nbsp;CmdName = regex.gsub(CmdName,&quot;%e&quot;,EditorFileExt) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- %e на значение EditorFileExt</div><div class="code_line">&nbsp;&nbsp; &nbsp;CmdName = regex.gsub(CmdName,&quot;%t&quot;,TmpName) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- %t на значение TmpName</div><div class="code_line">&nbsp;&nbsp; &nbsp;CmdName = regex.gsub(CmdName,&quot;%o&quot;,OutName) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- %o на значение OutName</div><div class="code_line">&nbsp;&nbsp; &nbsp;CmdName = regex.gsub(CmdName,&quot;%r&quot;,ResName) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- %r на значение ResName</div><div class="code_line">&nbsp;&nbsp; &nbsp;-- запускаем внешнюю обработку в зависимости от &quot;режима&quot; выбранного инструмента ------------------------------------</div><div class="code_line">&nbsp;&nbsp; &nbsp;if WriteFile(TmpName) ~= nil then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;local Out, Err = ExecCommand(CmdName, TmpName, OutName, ResName, ErrName, Cmd[ChoiceIdx][1])</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if Cmd[ChoiceIdx][1] == &quot;C&quot; then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if Err == &quot;&quot; or Err == nil then </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;far.Message(&quot;Компиляция прошла удачно&quot;, &#39;Результат компиляции&#39;, &#39;;Ok&#39;, &#39;k&#39;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;far.Message(win.OemToUtf8(Err), &#39;Ошибка&#39;, &#39;;Ok&#39;, &#39;w&#39;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if Out ~= &quot;&quot; and Out ~= nil then </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if Cmd[ChoiceIdx][1] == &quot;E&quot; then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;far.Message(win.WideCharToMultiByte(win.MultiByteToWideChar(Out,1251),65001), &#39;Результат выполнения&#39;, &#39;;Ok&#39;, &#39;k&#39;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LoadContent(Out) </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if Err == &quot;&quot; or Err == nil then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;far.Message(&#39;Обработчик вернул пустой вывод!&#39;, &#39;Ошибка&#39;, &#39;;Ok&#39;, &#39;w&#39;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;far.Message(&#39;Ошибка записи временного файла!!&#39;, &#39;Ошибка&#39;, &#39;;Ok&#39;, &#39;w&#39;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">end</div><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">-- Загрузка файла в редактор</div><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">function LoadContent(Content)</div><div class="code_line">&nbsp;&nbsp;local Ei = editor.GetInfo()</div><div class="code_line">&nbsp;&nbsp;local EId = Ei.EditorID</div><div class="code_line">&nbsp;&nbsp;local Flags = far.Flags</div><div class="code_line">&nbsp;&nbsp;editor.UndoRedo(EId, Flags.EUR_BEGIN)</div><div class="code_line">&nbsp;&nbsp;editor.Select(EId, BTYPE_STREAM, 1, 1, 1, Ei.TotalLines+1)</div><div class="code_line">&nbsp;&nbsp;editor.DeleteBlock(EId)</div><div class="code_line">&nbsp;&nbsp;Content = regex.gsub(Content,&quot;^(\xef\xbb\xbf)&quot;,&quot;&quot;)</div><div class="code_line">&nbsp;&nbsp;editor.InsertText(EId,Content)</div><div class="code_line">&nbsp;&nbsp;editor.UndoRedo(EId,Flags.EUR_END)</div><div class="code_line">&nbsp;&nbsp;editor.SetPosition(EId, 1, 1)</div><div class="code_line">end</div><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">-- Запуск процесса по обработке файла</div><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">function ExecCommand(CmdName, TmpName, OutName, ResName, ErrName, Mode)</div><div class="code_line">&nbsp;&nbsp;local RetOut, RetErr </div><div class="code_line">&nbsp;&nbsp;local File = io.popen((&#39;&quot;%s &#62;&quot;%s&quot; 2&#62;&quot;%s&quot;&#39;):format(CmdName, OutName, ErrName),&quot;w&quot;)</div><div class="code_line">&nbsp;&nbsp;if File == nil then</div><div class="code_line">&nbsp;&nbsp; &nbsp;far.Message(&#39;Ошибка при запуске команды!&#39;, &#39;Ошибка&#39;, &#39;;Ok&#39;, &#39;w&#39;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;return nil, nil</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;File:close()</div><div class="code_line">&nbsp;&nbsp;local TheName = OutName</div><div class="code_line">&nbsp;&nbsp;if Mode ~= &quot;P&quot; and Mode ~= &quot;E&quot; then TheName = ResName end</div><div class="code_line">&nbsp;&nbsp;if win.GetFileInfo(TheName) ~= nil then</div><div class="code_line">&nbsp;&nbsp; &nbsp;OutFile = io.open(TheName)</div><div class="code_line">&nbsp;&nbsp; &nbsp;if OutFile~= nil then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;RetOut = OutFile:read(&quot;*a&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;OutFile:close()</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;if win.GetFileInfo(ErrName) ~= nil then</div><div class="code_line">&nbsp;&nbsp; &nbsp;ErrFile = io.open(ErrName)</div><div class="code_line">&nbsp;&nbsp; &nbsp;if ErrFile~= nil then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;RetErr = ErrFile:read(&quot;*a&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;ErrFile:close()</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;win.ShellExecute(nil,nil,win.GetEnv&quot;COMSPEC&quot;,(&#39;/c &quot;del &quot;%s&quot; &quot;%s&quot; &quot;%s&quot; &quot;%s&quot;&#39;):format(TmpName, OutName, ResName, ErrName),nil,SW_HIDE)</div><div class="code_line">&nbsp;&nbsp;return RetOut, RetErr</div><div class="code_line">end</div><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">-- Запись файла</div><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">function WriteFile (FileName)</div><div class="code_line">&nbsp;&nbsp;local Info = editor.GetInfo()</div><div class="code_line">&nbsp;&nbsp;local File = io.open(FileName,&quot;wb&quot;)</div><div class="code_line">&nbsp;&nbsp;if File == nil then</div><div class="code_line">&nbsp;&nbsp; &nbsp;far.Message(&#39;Ошибка записи временного файла!&#39;, &#39;Ошибка&#39;, &#39;;Ok&#39;, &#39;w&#39;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;return nil</div><div class="code_line">&nbsp;&nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (bit.band(Info.Options, EOPT_BOM) == EOPT_BOM) then &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;File:write(string.char(239,187,191)) </div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;for Line = 1, Info.TotalLines do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;local Gs = editor.GetString(Info.EditorID, Line, 0) </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;File:write(Gs.StringText, Gs.StringEOL) </div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp;File:close()</div><div class="code_line">&nbsp;&nbsp; &nbsp;return Info.TotalLines</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">end</div><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">-- Macro</div><div class="code_line">------------------------------------------------------------------------------------------------------------------------</div><div class="code_line">Macro {</div><div class="code_line">&nbsp;&nbsp;area=&quot;Editor&quot;; key=&quot;CtrlE&quot;; flags=&quot;&quot;; description=&quot;EditorTools&quot;; </div><div class="code_line">&nbsp;&nbsp;action = function()</div><div class="code_line">&nbsp;&nbsp; &nbsp;EditorTools()</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">}</div></ol></div></div></div></div><br>
</div></div><br>
<strong class='tag-b'>Пример конфига EditorTools.conf</strong><br>
<div class="tag-spoiler spoiler closed"><div class="spoiler_header" onclick="openCloseParent(this)">Скрытый текст</div><div class="body"><br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">; Поля конфига следующие:</div><div class="code_line">;</div><div class="code_line">; Режим, &quot;Название-инструмента&quot;, &quot;командная строка&quot;</div><div class="code_line">; </div><div class="code_line">; Режим:</div><div class="code_line">;</div><div class="code_line">; &nbsp; [F]ilter - записываем временный файл, обрабатываем его, потом загружаем в редактор</div><div class="code_line">; &nbsp; [P]ipe - записываем временный файл, обрабатываем его, но загружаем STDOUT программы</div><div class="code_line">; &nbsp; [C]ompiler - сохраняем файл, запускаем команду компилятора </div><div class="code_line">; &nbsp; [E]xecute - сохраняем файл, запускаем команду интерпретатора, результат выводим в виде диалога </div><div class="code_line">;</div><div class="code_line">; Плейсхолдеры:</div><div class="code_line">;</div><div class="code_line">; &nbsp; %p - путь к файлу в редакторе</div><div class="code_line">; &nbsp; %n - имя файла в редакторе (без расширения)</div><div class="code_line">; &nbsp; %e - расширение имени файла в редакторе</div><div class="code_line">; &nbsp; %t - полное имя временного файла</div><div class="code_line">; &nbsp; %o - полное имя временного файла-результата (куда пишется из пайпа)</div><div class="code_line">; &nbsp; %r - полное имя временного файла-результата (куда может писать сама программа)</div><div class="code_line">;</div><div class="code_line">; Пример:</div><div class="code_line">;</div><div class="code_line">; F,&#39;Инструмент-1&#39;,&#39;comm-1.cmd&#39;</div><div class="code_line">; P,&#39;Инструмент-2&#39;,&#39;comm-2.cmd&#39;</div><div class="code_line">; C,&#39;Инструмент-3&#39;,&#39;comm-3.cmd&#39;</div><div class="code_line">; E,&#39;Инструмент-4&#39;,&#39;comm-4.cmd&#39;</div><div class="code_line">;</div><div class="code_line">&nbsp;</div><div class="code_line">P,&#39;AStyle (Space-P)&#39;,&#39;C:\Tools\AStyle\AStyle.exe --options=C:\Tools\AStyle\.astylerc-space --stdin=%t&#39;</div><div class="code_line">F,&#39;AStyle (Space-F)&#39;,&#39;C:\Tools\AStyle\AStyle.exe --options=C:\Tools\AStyle\.astylerc-space --stdin=%t --stdout=%r&#39;</div><div class="code_line">P,&#39;TidyP&#39;,&#39;C:\Tools\Tidy\tidy.exe -config c:\Tools\Tidy\tidy.conf &quot;%t&quot;&#39;</div><div class="code_line">P,&#39;Hello Ruby&#39;,&#39;ruby.exe C:\Tools\Far3-x64\Profile\Macros\scripts\EditorTools\hello.rb&#39;</div><div class="code_line">P,&#39;Test Perl-P&#39;,&#39;perl.exe C:\Tools\Far3-x64\Profile\Macros\scripts\EditorTools\test-p.pl &quot;%p%n.%e&quot;&#39;</div><div class="code_line">F,&#39;Test Perl-F&#39;,&#39;perl.exe C:\Tools\Far3-x64\Profile\Macros\scripts\EditorTools\test-f.pl &quot;%t&quot; &quot;%r&quot;&#39;</div><div class="code_line">C,&#39;Компилировать FASM программу&#39;,&#39;C:\Tools\Fasm\FASM.CMD &quot;%t&quot; &quot;%p%n.exe&quot;&#39;</div><div class="code_line">E,&#39;Исполнить Perl скрипт&#39;,&#39;perl.exe %t&#39;</div><div class="code_line">E,&#39;Исполнить SWI-Prolog скрипт&#39;,&#39;C:\Tools\Prolog\bin\swipl.exe -q -f %t&#39;</div></ol></div></div></div></div><br>
</div></div><br>
<strong class='tag-b'>Мои конфиги форматеров</strong><br>
<div class="tag-spoiler spoiler closed"><div class="spoiler_header" onclick="openCloseParent(this)">Скрытый текст</div><div class="body"><br>
.astylerc-space<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">align-pointer=type</div><div class="code_line">align-reference=type</div><div class="code_line">attach-classes</div><div class="code_line">attach-closing-while </div><div class="code_line">attach-extern-c</div><div class="code_line">attach-inlines</div><div class="code_line">attach-namespaces</div><div class="code_line">attach-return-type</div><div class="code_line">break-one-line-headers</div><div class="code_line">close-templates</div><div class="code_line">delete-empty-lines</div><div class="code_line">indent-cases</div><div class="code_line">indent-classes</div><div class="code_line">indent-col1-comments</div><div class="code_line">indent-modifiers</div><div class="code_line">indent-namespaces</div><div class="code_line">indent-preproc-block</div><div class="code_line">indent-preproc-define</div><div class="code_line">indent-switches</div><div class="code_line">indent=spaces=2</div><div class="code_line">keep-one-line-blocks</div><div class="code_line">max-continuation-indent=40</div><div class="code_line">min-conditional-indent=1</div><div class="code_line">pad-comma</div><div class="code_line">pad-header</div><div class="code_line">pad-oper</div><div class="code_line">remove-brackets</div><div class="code_line">style=java</div><div class="code_line">unpad-paren</div></ol></div></div></div></div><br>
.astylerc-tabs<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">align-pointer=type</div><div class="code_line">align-reference=type</div><div class="code_line">attach-classes</div><div class="code_line">attach-closing-while </div><div class="code_line">attach-extern-c</div><div class="code_line">attach-inlines</div><div class="code_line">attach-namespaces</div><div class="code_line">attach-return-type</div><div class="code_line">break-one-line-headers</div><div class="code_line">close-templates</div><div class="code_line">delete-empty-lines</div><div class="code_line">indent-cases</div><div class="code_line">indent-classes</div><div class="code_line">indent-col1-comments</div><div class="code_line">indent-modifiers</div><div class="code_line">indent-namespaces</div><div class="code_line">indent-preproc-block</div><div class="code_line">indent-preproc-define</div><div class="code_line">indent-switches</div><div class="code_line">indent=force-tab=2</div><div class="code_line">keep-one-line-blocks</div><div class="code_line">max-continuation-indent=40</div><div class="code_line">min-conditional-indent=1</div><div class="code_line">pad-comma</div><div class="code_line">pad-header</div><div class="code_line">pad-oper</div><div class="code_line">remove-brackets</div><div class="code_line">style=java</div><div class="code_line">unpad-paren</div></ol></div></div></div></div><br>
tidy.conf<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">// sample config file for HTML tidy</div><div class="code_line">indent: auto</div><div class="code_line">indent-spaces: 2</div><div class="code_line">wrap: 0</div><div class="code_line">markup: yes</div><div class="code_line">output-xml: no</div><div class="code_line">input-xml: no</div><div class="code_line">show-warnings: yes</div><div class="code_line">numeric-entities: yes</div><div class="code_line">quote-marks: yes</div><div class="code_line">quote-nbsp: yes</div><div class="code_line">quote-ampersand: no</div><div class="code_line">break-before-br: no</div><div class="code_line">uppercase-tags: no</div><div class="code_line">uppercase-attributes: no</div><div class="code_line">char-encoding: utf8</div><div class="code_line">new-inline-tags: cfif, cfelse, math, mroot,</div><div class="code_line">&nbsp;&nbsp;mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover,</div><div class="code_line">&nbsp;&nbsp;munder, mover, mmultiscripts, msup, msub, mtext,</div><div class="code_line">&nbsp;&nbsp;mprescripts, mtable, mtr, mtd, mth</div><div class="code_line">new-blocklevel-tags: cfoutput, cfquery</div><div class="code_line">new-empty-tags: cfelse</div><div class="code_line">drop-empty-elements: no</div></ol></div></div></div></div><br>
</div></div><br>
<strong class='tag-b'>Установка</strong><br>
<br>
Скрипт и его конфиг нужно переписать в каталог скриптов (в свой подкаталог). Перезапустить Far. Для себя я настроил Far так, чтобы каталог профилей лежал рядом, а не в домашнем каталоге. По итогу у меня макрос лежит в каталоге - <em class='tag-i'>C:&#092;Tools&#092;Far3-x64&#092;Profile&#092;Macros&#092;scripts&#092;EditorTools</em><br>
<br>
Если будут вопросы - прошу в личку. Чтобы не засорять тред про Far.]]></description>
        <author>JoeUser</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3829257</guid>
        <pubDate>Sat, 25 Apr 2020 23:33:46 +0000</pubDate>
        <title>FAR Manager</title>
        <link>https://forum.sources.ru/index.php?showtopic=418325&amp;view=findpost&amp;p=3829257</link>
        <description><![CDATA[JoeUser: <span class='tag-size' data-value='14' style='font-size:14pt;'><strong class='tag-b'>Far Manager</strong></span><br>
<br>
<strong class='tag-b'>Windows. FreeWare.</strong><br>
<br>
Многофункциональный файловый менеджер для работы с различными файлами, позволяет просматривать файлы и каталоги, редактировать, копировать и переименовывать файлы. Поддерживает Unicode имеет удобный и простой в использовании пользовательский интерфейс с многоязычной поддержкой. Позволяет работать с архивами, FTP-клиентами, и просматривать сеть с помощью реализованных в стандартную поставку плагинов. Кроме того есть возможность расширения функциональности за счет подключения дополнительных плагинов.<br>
<br>
<img class='tag-img' src='https://i111.fastpic.ru/big/2020/0426/d6/fa707fa887464e7b4afe506175145bd6.jpg' alt='user posted image'><br>
<br>
Ну очень странно что его уже давным давно не включили в разделе &quot;Полезного ПО&quot;  :-?  <br>
<br>
<strong class='tag-b'>Подключаемые модули (плагины)</strong><br>
<br>
Возможности FAR существенно расширяются благодаря плагинам различного назначения:<br>
<br>
<ul class="tag-list"><li>управление принтерами, как подключёнными к ПК, так и сетевыми;</li><li>подсветка синтаксиса в исходных текстах программ;</li><li>работа с FTP-серверами (с поддержкой доступа через различные типы прокси, автоматической докачкой и прочее);</li><li>работа с SFTP-серверами (плагин WinSCP);</li><li>поиск и замена символов одновременно во множестве файлов с применением регулярных выражений;</li><li>средства переименования групп файлов с возможностью использования сложных составных масок из символов подстановки и шаблонов;</li><li>NNTP/SMTP/POP3/IMAP4 клиенты и отправка сообщений на пейджер;</li><li>работа при нестандартных размерах текстового экрана;</li><li>перекодировка текстов с учётом национальных кодовых таблиц;</li><li>манипуляции с содержимым корзины;</li><li>управление приоритетами процессов на локальном или на сетевом ПК;</li><li>автозавершение слов в редакторе и работа с шаблонами;</li><li>редактирование реестра Windows;</li><li>создание и изменение ярлыков Windows;</li><li>всевозможные манипуляции с файлами и текстом, делающие комфортной работу с фидонетовскими материалами;</li><li>кодирование и декодирование файлов в формате UUE;</li><li>симметричное и асимметричное шифрование файлов;</li><li>управление программой Winamp и модификация комментариев MP3-файлов;</li><li>просмотр и редактирование содержимого ресурсов различных игр;</li><li>работа с различными серверами через ODBC + работа с серверами Oracle через OCI;</li><li>управление службой RAS;</li><li>запуск внешних программ (компиляторов, конвертеров и проч.) при редактировании текстов в редакторе FAR;</li><li>отображение содержимого файлов справки Windows (.hlp и .chm);</li><li>калькуляторы с разными возможностями;</li><li>функции проверки орфографии при обработке текста в редакторе FAR;</li><li>работа с файл-образами дисков для ZX Spectrum и пк Вектор-06Ц;</li><li>подготовка каталога сменных накопителей и многое другое.</li><li>вычисление и проверка CRC и криптографических хеш значений файлов (SHA-1; SHA-2; Whirlpool и других).</li><li>Отображение скрытой файловой системы на телефонах SonyEricsson</li><li>Некоторые важные плагины (например, для работы с FTP, печати, сравнения файлов, работы с архивами, сетью) входят в поставку FAR. Но подавляющее большинство плагинов доступно для скачивания в интернете, пользователь может устанавливать их в соответствии со своими задачами. В настоящее время насчитывается более 700 плагинов для FAR.</li></ul><br>
<strong class='tag-b'>Домашняя страничка:</strong> <a class='tag-url' href='https://farmanager.com' target='_blank'>https://farmanager.com</a>]]></description>
        <author>JoeUser</author>
        <category>Новое и полезное ПО</category>
      </item>
	
      </channel>
      </rss>
	