Re: Bracketed paste for terminal vim

2014-07-14 Fir de Conversatie Paul LeoNerd Evans
On Fri, 11 Jul 2014 23:35:15 +0200
Bram Moolenaar b...@moolenaar.net wrote:

 Since what version of xterm and screen is this supported?  I suspect
 older versions do not support it.

It ultimately doesn't really matter. You send DECSM 2000 to ask for it
to be enabled. Either that works and you now get the extra keys, or you
don't, and you don't. Have the incoming code cope with the received
keys regardless, then it's just an optimisation.

-- 
Paul LeoNerd Evans

leon...@leonerd.org.uk
http://www.leonerd.org.uk/  |  https://metacpan.org/author/PEVANS


signature.asc
Description: PGP signature


Re: Issue 238 in vim: linebreak causes control characters to display incorrectly

2014-07-14 Fir de Conversatie Павлов Николай Александрович
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On July 14, 2014 6:09:22 PM GMT+03:00, Christian Brabandt cbli...@256bit.org 
wrote:
On Mo, 14 Jul 2014, v...@googlecode.com wrote:

 Status: New
 Owner: 
 Labels: Type-Defect Priority-Medium

 New issue 238 by kimmy.li...@gmail.com: linebreak causes control
 characters to display incorrectly
 http://code.google.com/p/vim/issues/detail?id=238

 What steps will reproduce the problem?
 1. Open vim, enter some control characters (^A, ^B, ^C)
 2. :set linebreak

 What is the expected output? What do you see instead?
 Expect to see ^A^B^C, instead it shows ^^^.

 What version of the product are you using? On what operating system?
 Vim 7.4.364 on Linux.

 Please provide any additional information below.
 An hg bisect gives v7-4-353 as the first bad revision.

Sorry, this was my fault. This should fix the problem. (I'll update the

test, once Bram has split up test_listlbr in utf8 and non-utf8 part).

Best,
Christian
--
In der Welt der Frauen zählen nur die anderen Frauen.
   -- Esther Vilar

--
--
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google
Groups vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send
an email to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Replies here are not posted to the issue tracker.
-BEGIN PGP SIGNATURE-
Version: APG v1.1.1

iQI1BAEBCgAfBQJTw/4LGBxaeVggPHp5eC52aW1AZ21haWwuY29tPgAKCRCf3UKj
HhHSvnuND/sE5OvFZvw3EaQ5xBHChm04dKqBGtp9x5zHSEdNiwmJoyxVY0qTbXki
nzx8TSlCjFjvBaeOKT+Yhvvo92f7Txp5xuE2WSNq1ndbZLBFb0LKUz/xX7r7XLwb
+YQYoQ1rsvtJ1bnZyUMgTQ+SfBCMwQxAXnpdCIpDSiZFKp1nzUpBdsQh7JIRFr28
YZ6SgsFd5FeA6keHBPP96Hb8vFwwUzlzbcm31uPrsP6jO7kkFNcmJtfBp+UOw7qE
/ulvZ71plVdAKRdRcVFIa3gb7oe5oIuWp9uSnp7FTYK/tvuWuIJgzWgBCpak6d0x
c6Me9QyBOtbhQbZDUwUfSFRMAyLMLJBB0XdXIuNq98T65e/eMV9ynh+NKH1wHxIR
QsO4fRqgwDuuBni43Nfq0MdVDZE8VIRAPq/8PNRQKtNG1HRvWnfiGLiuECy6wnKo
UkaXlBYZEjIvd3ptjlE6/fjK4lI0MJbD83xga0276XaI2ZOvKDj4owASqOnl03Q/
oEaGjiOijT4Lk9qWixdm97k4M2OjDbqGrXI9EbudCwyCM8i8tLUbdu8trZERz692
wXe4ruCu6uJjbzO6ZK1YMRuSjVekL18/OdkQcMvHU7lOCDPOXRVrS1ANZNQjzoNs
ZjdbJgJ/RlkzlDincEX2djrvV+lGWisabQwesur0zRo4sKLrWIjoZw==
=VwxG
-END PGP SIGNATURE-

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue 238 in vim: linebreak causes control characters to display incorrectly

2014-07-14 Fir de Conversatie Christian Brabandt
Hi Павлов!

On Mo, 14 Jul 2014, Павлов Николай Александрович wrote:

 Replies here are not posted to the issue tracker.

I know. But I had limited internet connectivity and I am pretty sure, 
Bram reads here sporadically.

Best,
Christian 
-- 
Was mich immer tief alteriert hat, das ist die Selbstverständlichkeit,
mit der die meisten Menschen ihr Gesicht tragen.
-- Karl Kraus

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Bracketed paste for terminal vim

2014-07-14 Fir de Conversatie Bram Moolenaar

Paul Evans wrote:

 On Fri, 11 Jul 2014 23:35:15 +0200
 Bram Moolenaar b...@moolenaar.net wrote:
 
  Since what version of xterm and screen is this supported?  I suspect
  older versions do not support it.
 
 It ultimately doesn't really matter. You send DECSM 2000 to ask for it
 to be enabled. Either that works and you now get the extra keys, or you
 don't, and you don't. Have the incoming code cope with the received
 keys regardless, then it's just an optimisation.

I rather stay on the safe side and only send an escape sequence when it
would do something useful.  Keep in mind that whenever you run a shell
it has to be disabled.  And also on exit, of course.

Simplest would be to recognize the xterm version being above a certain
level.  I don't know how to check that for screen.

-- 
Yesterday, all my deadlines seemed so far away
now it looks as though it's freeze in four days
oh I believe in cvs..
[ CVS log Beatles style for FreeBSD ports/INDEX, Satoshi Asami ]

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [patch] Fix characters from completion suggestion remaining in line

2014-07-14 Fir de Conversatie Jacob Niehus
On Sunday, July 13, 2014 2:20:04 PM UTC-7, Bram Moolenaar wrote:
 Jacob Niehus wrote:
 
 
 
  On Sunday, July 6, 2014 5:23:39 PM UTC-7, Jacob Niehus wrote:
 
   After patch 7.4.314, I've had characters that I hadn't typed stay on 
   screen even though they aren't really there and they go away after 
   exiting insert mode. I am using NeoComplete in Vim 7.4 with patches 
   1-347. The attached patch fixes the problem without affecting the feature 
   introduced in patch 7.4.314. See also attached screenshots showing the 
   current line in insert mode and then the same line after pressing escape. 
   That problem happens in the current version of Vim but not after my 
   change.
 
   
 
   I am seeing this problem in Cygwin (Windows 7) in both mintty and XTerm. 
   My Cygwin version is:
 
   CYGWIN_NT-6.1-WOW64 1.7.30(0.272/5/3) 2014-05-23 10:36
 
   
 
   Here is my Vim version information:
 
 [...]
 
 
 
  Bram,
 
  
 
  On further thought I don't think this patch should be included. It's a
 
  bad workaround and I have seen the completion messages pop up
 
  occasionally since using it. I'll try and find a better solution.
 
 
 
 It was already included as patch 7.4.357.  I suppose it's not necessary
 
 to roll it back.  But if you have a better solution that is welcome.
 
 
 
 -- 
 
 Close your shells, or I'll kill -9 you
 
 Tomorrow I'll quota you
 
 Remember the disks'll always be full
 
 And then while I'm away
 
 I'll write ~ everyday
 
 And I'll send-pr all my buggings to you.
 
 [ CVS log Beatles style for FreeBSD ports/INDEX, Satoshi Asami ]
 
 
 
  /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
 
 ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
 
 \\\  an exciting new programming language -- http://www.Zimbu.org///
 
  \\\help me help AIDS victims -- http://ICCF-Holland.org///

Bram,

I've come up with two ways to fix it, but I'm not sure either is acceptable. 
When I submit this patch, I will roll back the change because Shougo wrote that 
the way he did to prevent -- INSERT -- from flickering during completion, 
which my change broken.

I think the problem is that the ins_compl_delete() function calls 
changed_cline_bef_curs(), but the line is also changed after the cursor because 
that's where the completion candidate was, so it's getting left there. Actually 
even exiting insert mode does not clear the remaining characters - that only 
worked because I had 'set cursorline' on InsertLeave. I can redraw the line 
using update_screen(CLEAR) or screen_fill(), and the latter is probably faster, 
but is there a more straightforward way of redrawing the portion of the line 
after the cursor that I haven't found? If not, I'll submit a patch using 
screen_fill.

Thanks,
Jake

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[patch] Separate filetype for JSON

2014-07-14 Fir de Conversatie David Barnett
This is a patch to create a separate json filetype and use it for *.json files 
instead of using javascript. It currently just forwards indent and syntax 
settings to the javascript filetype, but it does define its own 
ftplugin/json.vim file since most of the settings in ftplugin/javascript.vim 
don't apply to JSON. I'd like to submit it to be integrated in vim under the 
Vim license.

My reasons for wanting to do this instead of just using the javascript filetype 
are:
  * JSON is not JavaScript, it's a very small subset of the language. Comments 
and many other details of JavaScript syntax are completely invalid in a 
JavaScript file, so it's misleading to treat them as the same filetype.
  * Several plugins (syntastic, vim-snippets, vim-addon-manager) refer to a 
json filetype that doesn't actually exist unless you install some third-party 
plugin to apply it. This leads to vim unexpectedly triggering javascript 
actions on json files, and in the case of vim-addon-manager means 
addon-info.json files aren't syntax highlighted at all 
(https://github.com/MarcWeber/vim-addon-manager/issues/163).

David

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff -r 0efec12f52ac runtime/filetype.vim
--- a/runtime/filetype.vim	Thu Jul 10 22:01:47 2014 +0200
+++ b/runtime/filetype.vim	Thu Jul 10 22:20:25 2014 -0700
@@ -989,7 +989,7 @@
 au BufNewFile,BufRead *.jj,*.jjt		setf javacc
 
  JavaScript, ECMAScript
-au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.json   setf javascript
+au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx   setf javascript
 
  Java Server Pages
 au BufNewFile,BufRead *.jsp			setf jsp
@@ -1007,6 +1007,9 @@
  Jovial
 au BufNewFile,BufRead *.jov,*.j73,*.jovial	setf jovial
 
+ JSON
+au BufNewFile,BufRead *.json			setf json
+
  Kixtart
 au BufNewFile,BufRead *.kix			setf kix
 
diff -r 0efec12f52ac runtime/ftplugin/json.vim
--- /dev/null	Thu Jan 01 00:00:00 1970 +
+++ b/runtime/ftplugin/json.vim	Thu Jul 10 22:20:25 2014 -0700
@@ -0,0 +1,17 @@
+ Vim filetype plugin
+ Language:		JSON
+ Maintainer:		David Barnett daviebdawg+...@gmail.com
+ Last Change:		2014 Jul 10
+
+if exists('b:did_ftplugin')
+  finish
+endif
+let b:did_ftplugin = 1
+
+let b:undo_ftplugin = 'setlocal formatoptions comments commentstring'
+
+setlocal formatoptions-=t
+
+ JSON has no comments.
+setlocal comments=
+setlocal commentstring=
diff -r 0efec12f52ac runtime/indent/json.vim
--- /dev/null	Thu Jan 01 00:00:00 1970 +
+++ b/runtime/indent/json.vim	Thu Jul 10 22:20:25 2014 -0700
@@ -0,0 +1,13 @@
+ Vim indent file
+ Language:		JSON
+ Maintainer:		David Barnett daviebdawg+...@gmail.com
+ Last Change:		2014 Jul 10
+
+if exists('b:did_indent')
+   finish
+endif
+
+ JSON is a subset of JavaScript. JavaScript indenting should work fine.
+runtime! indent/javascript.vim
+
+let b:did_indent = 1
diff -r 0efec12f52ac runtime/syntax/json.vim
--- /dev/null	Thu Jan 01 00:00:00 1970 +
+++ b/runtime/syntax/json.vim	Thu Jul 10 22:20:25 2014 -0700
@@ -0,0 +1,23 @@
+ Vim syntax file
+ Language:		JSON
+ Maintainer:		David Barnett daviebdawg+...@gmail.com
+ Last Change:		2014 Jul 10
+
+ For version 5.x: Clear all syntax items.
+ For version 6.x and later: Quit when a syntax file was already loaded.
+if v:version  600
+  syntax clear
+elseif exists('b:current_syntax')
+  finish
+endif
+
+
+ Use JavaScript syntax. JSON is a subset of JavaScript.
+if version  600
+  source sfile:p:h/javascript.vim
+else
+  runtime! syntax/javascript.vim
+  unlet b:current_syntax
+endif
+
+let b:current_syntax = 'json'