Re: vim.org is down

2015-04-29 Fir de Conversatie Lane East
在 2011年4月23日星期六 UTC+8上午8:22:06,Ben Schmidt写道:
 Jason wrote:
  There is no A record for the domain name vim.org. That is,
  this link shouldn't work:
 
  http://vim.org/
 
 That's correct, actually. Not only doesn't it work, but it shouldn't
 work. It is a shame people have abused DNS and expect it to work.
 
 Marc wrote:
  There have been lot's of discussion about this on the mailinglist.
  That this topic is being written about again and again is a reason to
  change it. IMHO.
 
 To some extent, I agree. It'd be nice to 'fix' this, just to silence the
 noise on the mailing list.
 
 But how?
 
 We can't CNAME it; it would be against spec, and would break things. We
 can't add an A record, because sourceforge might change it under us
 and/or we don't know what magic they might be doing with load balancing,
 etc. that we would irresponsibly bypass if we did that.
 
 Perhaps the simplest thing is to get some cheap 'DNS hosting' that
 offers a 'redirect' function. Basically the function just has a server
 listen on port 80 for requests and return a 3xx (preferably 301 in our
 case) redirect (to http://www.vim.org/ in our case) whenever it gets
 one. No smart URL rewriting or anything. We might already have it (it
 commonly is included with domain names in my experience) and just need
 to set it up. If not, in my experience, it's very cheap, something like
 a year's worth of hosting for the price of a glass of fruit juice.
 Because it's actually a webserver, not done in DNS, it bypasses the
 DNS-related difficulties, and because it's such a simple task and it
 should be low-traffic anyway, loading isn't an issue.
 
 Ben.

I know wwwizer provides a server for this, just point vim.org to 
174.129.25.170, it'll do a 301 redirection to www.vim.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: New feature: absolute line number in relativenumber for the current line

2013-02-06 Fir de Conversatie Lane East
在 2013年1月30日星期三UTC+8上午5时33分42秒,Bram Moolenaar写道:
 Nazri Ramliy wrote:
 
 
 
  On Tue, Jan 29, 2013 at 6:21 PM, Paul Ruane  wrote:
 
   Whilst it is not that hard to scan the status line, I find that I hit
 
   this glitch in my workflow many, many times a day: when I want to know
 
   what line I am on, I intuitively scan the gutter for the line number.
 
   I then realise that relativenumber is on so I redirect my attention to
 
   the status line and then have to parse the number from the other
 
   fields down there.
 
  
 
  The following patch does what you want. After trying it out for a few 
  minutes
 
  it does feel easier to find out the current line number. I normally
 
  have the line
 
  number in my statusline, and on the occasion where the statusline is not 
  shown
 
  I've trained my fingers to hit Ctrl+G and scan the bottom line for the
 
  line number.
 
  
 
  Having the current line number, instead of a '0' shown at the current
 
  line seems more useful. For better distinction the current line number
 
  ca be left-aligned (for left-to-right text orientation) to make it
 
  look different than the relative-line-numbers (I made no attempt at
 
  this in the patch below).
 
  
 
  Others might find it weird.
 
 
 
 I think the information is useful.  Who is against showing the current
 
 line number instead of zero?
 
 
 
 Is the width of the column a problem?
 
 
 
 -- 
 
 Hegel was right when he said that we learn from history that man can
 
 never learn anything from history.   (George Bernard Shaw)
 
 
 
  /// 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///

Here is a patch that adds an option 'rnucurrent'/'rnuc' to control the current 
line number style: left-align, absolute line number.

-- 
-- 
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/groups/opt_out.


diff -r 30b3b1da0350 src/option.c
--- a/src/option.c	Thu Jan 31 21:09:15 2013 +0100
+++ b/src/option.c	Wed Feb 06 17:29:05 2013 +0800
@@ -2107,6 +2107,9 @@
 			{(char_u *)NULL, (char_u *)0L}
 #endif
 			SCRIPTID_INIT},
+{rnucurrent, rnuc,  P_STRING|P_VIM|P_VI_DEF|P_COMMA|P_NODUP|P_RALL,
+			(char_u *)p_rnuc, PV_NONE,
+			{(char_u *), (char_u *)0L} SCRIPTID_INIT},
 {ruler,	ru,   P_BOOL|P_VI_DEF|P_VIM|P_RSTAT,
 #ifdef FEAT_CMDL_INFO
 			(char_u *)p_ru, PV_NONE,
@@ -2983,6 +2986,7 @@
 #ifdef FEAT_INS_EXPAND
 static char *(p_cot_values[]) = {menu, menuone, longest, preview, NULL};
 #endif
+static char *(p_rnuc_values[]) = {absolute, left, NULL};
 
 static void set_option_default __ARGS((int, int opt_flags, int compatible));
 static void set_options_default __ARGS((int opt_flags));
@@ -3566,6 +3570,7 @@
 #ifdef FEAT_EVAL
 set_option_scriptID_idx(opt_idx, opt_flags, current_SID);
 #endif
+p_rnuc_n = 0;
 }
 
 /*
@@ -6930,6 +6935,21 @@
 }
 #endif
 
+/* 'rnucurrent' */
+else if (varp == p_rnuc)
+{
+	if (check_opt_strings(p_rnuc, p_rnuc_values, TRUE) != OK)
+	errmsg = e_invarg;
+	else
+	{
+	p_rnuc_n = 0;
+	if (strstr((char *)p_rnuc, absolute) != NULL)
+		p_rnuc_n |= RNUC_ABSOLUTE;
+	if (strstr((char *)p_rnuc, left) != NULL)
+		p_rnuc_n |= RNUC_LEFT;
+	}
+}
+
 #if defined(FEAT_CSCOPE)  defined(FEAT_QUICKFIX)
 else if (varp == p_csqf)
 {
diff -r 30b3b1da0350 src/option.h
--- a/src/option.h	Thu Jan 31 21:09:15 2013 +0100
+++ b/src/option.h	Wed Feb 06 17:29:05 2013 +0800
@@ -663,6 +663,10 @@
 EXTERN int	p_ari;		/* 'allowrevins' */
 EXTERN int	p_ri;		/* 'revins' */
 #endif
+#define RNUC_ABSOLUTE	0x1
+#define RNUC_LEFT	0x2
+EXTERN char_u	*p_rnuc;	/* 'rnucurrent */
+EXTERN int	p_rnuc_n;
 #ifdef FEAT_CMDL_INFO
 EXTERN int	p_ru;		/* 'ruler' */
 #endif
diff -r 30b3b1da0350 src/screen.c
--- a/src/screen.c	Thu Jan 31 21:09:15 2013 +0100
+++ b/src/screen.c	Wed Feb 06 17:29:05 2013 +0800
@@ -2333,8 +2333,10 @@
 		num = labs((long)get_cursor_rel_lnum(wp, lnum));
 		if (num == 0)
 		{
-		num = lnum;
-		fmt = %-*ld ;
+		if (p_rnuc_n  RNUC_ABSOLUTE)
+			num = lnum;
+		if (p_rnuc_n  RNUC_LEFT)
+			fmt = %-*ld ;
 		}
 	}
 
@@ -3503,8 +3505,10 @@
 			num = labs((long)get_cursor_rel_lnum(wp, lnum));
 			if (num == 0)
 			{
-num = lnum;
-fmt = %-*ld ;
+if  (p_rnuc_n  RNUC_ABSOLUTE)
+num = lnum;
+if (p_rnuc_n  RNUC_LEFT)
+fmt = %-*ld ;
 			}
 			}
 
@@