<div dir="ltr"><p>посмотри содержимое переменной v:scrollstart. она должна показать, из-за чего повился этот hit enter..</p><p>ещё стоит посмотреть shortmess и showcmd, это переменные вима<br></p><br><div class="gmail_quote">
6 сентября 2008 г. 14:46 пользователь Shrub Alexey <span dir="ltr">&lt;<a href="mailto:ashrub@agava.com">ashrub@agava.com</a>&gt;</span> написал:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Работает! Только Enter нужно нажимать при открытии файла<br>
&quot;<br>
&quot;Config.pm&quot; 1895 lines, 87132 characters<br>
&quot;Config.pm&quot; [converted] 1895 lines, 87132 characters<br>
Hit ENTER or type command to continue<br>
&quot;<br>
Можно убрать?<br>
Вот это я понимаю, да здравствует унификация :-)<div><div class="Wj3C7c"><br>
<br>
Maxim Vuets wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
05.09.08, Павел Тимонин&lt;<a href="mailto:gg.error@gmail.com" target="_blank">gg.error@gmail.com</a>&gt; написал(а):<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
я не придумал, времени не зватает особо думать. хотя можно прикрутить к виму<br>
перловый обработчик и заставить его.. не знаю.<br>
вопрос - зачем, если вим определяет кодировки при открытии автоматически и<br>
правильно? как его заставить это делать я уже писал.<br>
</blockquote>
<br>
У меня було чуток времени и я вот накропал то, что требовало сообщество (:<br>
Не надо патчить vim, надо лишь скопировать в ~/.vim/plugin файл следующего<br>
содержания:<br>
<br>
---------------8&lt;---------------8&lt;---------------8&lt;---------------<br>
&quot; File: emacscoding.vim<br>
&quot; Author: Maxim Vuets &lt;<a href="mailto:maxim.vuets@gmail.com" target="_blank">maxim.vuets@gmail.com</a>&gt;<br>
&quot; Last Change: 2008 Sep 05<br>
&quot; Version: 0.1<br>
<br>
function EmacsCodingLine()<br>
 &nbsp; &nbsp; &nbsp; &nbsp;let l = getline(1)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if match(l, &#39;#!&#39;) == 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;let l = getline(2)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;endif<br>
 &nbsp; &nbsp; &nbsp; &nbsp;let re = &#39;^.*-\*-\s\{1,\}.*coding:\s\{1,\}\([a-zA-Z0-9-]\{1,\}\).*\s\{1,\}\-\*-.*$&#39;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if match(l, re) == 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;let enc = substitute(l, re, &#39;\1&#39;, &#39;&#39;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;execute &#39;:edit ++enc=&#39; . enc<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;let &amp;fenc = enc<br>
 &nbsp; &nbsp; &nbsp; &nbsp;endif<br>
endfunction<br>
<br>
autocmd BufRead * call EmacsCodingLine()<br>
---------------8&lt;---------------8&lt;---------------8&lt;---------------<br>
<br>
Я попытался сэмулировать логику работы emacs, то есть:<br>
In shell scripts, the first line is used to identify the script interpreter,<br>
so you cannot put any local variables there. To accommodate this,<br>
Emacs looks for local variable specifications in the second line<br>
when the first line specifies an interpreter.<br>
<br>
Это мой первый vim-скрипт (=<br>
<br>
</blockquote>
<br>
-- <br></div></div><div class="Ih2E3d">
Шруб Алексей<br>
Технический руководитель проектов<br>
icq: 345894734<br>
<a href="http://www.agava.ru/" target="_blank">http://www.agava.ru/</a><br>
--<br></div><div><div class="Wj3C7c">
Moscow.pm mailing list<br>
<a href="mailto:moscow-pm@pm.org" target="_blank">moscow-pm@pm.org</a> | <a href="http://moscow.pm.org" target="_blank">http://moscow.pm.org</a><br>
</div></div></blockquote></div><br></div>