diff -cr links-current/default.c links-zoso/default.c
*** links-current/default.c	Wed May 31 10:08:49 2000
--- links-zoso/default.c	Thu Jun 22 14:44:12 2000
***************
*** 564,569 ****
--- 564,574 ----
  	if ((i = get_cp_index(w)) == -1) goto err_f;
  	ts->charset = i;
  	mem_free(w);
+ 	if (!(w = get_word(&c))) goto err;
+ 	if (strlen(w) != 1 || w[0] < '0' || w[0] > '1') goto err_f;
+ 	ts->vi_keys = w[0] - '0';
+ 	fprintf (stderr, "vi_keys queda con el resultado %i\n", ts->vi_keys);
+ 	mem_free(w);
  	end:
  	return NULL;
  	err_f:
***************
*** 588,593 ****
--- 593,600 ----
  		add_num_to_str(s, l, ts->col);
  		add_to_str(s, l, " ");
  		add_to_str(s, l, get_cp_mime_name(ts->charset));
+ 		add_to_str(s, l, " ");
+ 		add_num_to_str(s, l, ts->vi_keys);
  	}
  }
  
diff -cr links-current/language.h links-zoso/language.h
*** links-current/language.h	Wed May 31 16:22:40 2000
--- links-zoso/language.h	Thu Jun 22 14:44:12 2000
***************
*** 337,340 ****
  #define T_HK_FULL_SCREEN    333	
  #define T_HK_BEOS_TERMINAL    334	
  #define T_HK_NEW_WINDOW    335	
! #define T__N_TEXTS    336	
--- 337,341 ----
  #define T_HK_FULL_SCREEN    333	
  #define T_HK_BEOS_TERMINAL    334	
  #define T_HK_NEW_WINDOW    335	
! #define T_VI_KEYS    336
! #define T__N_TEXTS    337
diff -cr links-current/language.inc links-zoso/language.inc
*** links-current/language.inc	Wed May 31 16:22:40 2000
--- links-zoso/language.inc	Thu Jun 22 14:44:12 2000
***************
*** 337,342 ****
--- 337,343 ----
    T_HK_FULL_SCREEN, "F",
    T_HK_BEOS_TERMINAL, "B",
    T_HK_NEW_WINDOW, "N",
+   T_VI_KEYS, "Vi-like keys",
    0, NULL
  };
  
***************
*** 677,682 ****
--- 678,684 ----
    T_HK_FULL_SCREEN, "C",
    T_HK_BEOS_TERMINAL, "B",
    T_HK_NEW_WINDOW, "N",
+   T_VI_KEYS, "Vi-like keys",
    0, NULL
  };
  
***************
*** 1017,1022 ****
--- 1019,1025 ----
    T_HK_FULL_SCREEN, "F",
    T_HK_BEOS_TERMINAL, "B",
    T_HK_NEW_WINDOW, "N",
+   T_VI_KEYS, "Vi-like keys",
    0, NULL
  };
  
***************
*** 1357,1362 ****
--- 1360,1366 ----
    T_HK_FULL_SCREEN, "F",
    T_HK_BEOS_TERMINAL, "B",
    T_HK_NEW_WINDOW, "N",
+   T_VI_KEYS, "Vi-like keys",
    0, NULL
  };
  
***************
*** 2037,2042 ****
--- 2041,2047 ----
    T_HK_FULL_SCREEN, NULL,
    T_HK_BEOS_TERMINAL, NULL,
    T_HK_NEW_WINDOW, NULL,
+   T_VI_KEYS, "Vi-like keys",
    0, NULL
  };
  
diff -cr links-current/links.h links-zoso/links.h
*** links-current/links.h	Wed May 31 15:33:06 2000
--- links-zoso/links.h	Thu Jun 22 14:44:12 2000
***************
*** 918,923 ****
--- 918,924 ----
  	int restrict_852;
  	int col;
  	int charset;
+ 	int vi_keys;
  };
  
  #define TERM_DUMB	0
diff -cr links-current/main.c links-zoso/main.c
*** links-current/main.c	Wed May 31 15:14:52 2000
--- links-zoso/main.c	Thu Jun 22 14:44:12 2000
***************
*** 246,251 ****
--- 246,255 ----
  	set_sigcld();
  	init_home();
  	if (!(u = parse_options(ac - 1, av + 1))) goto ttt;
+ 	if ((dds.assume_cp = get_cp_index("ISO-8859-1")) == -1) dds.assume_cp = 0;
+ 	load_config();
+ 	read_bookmarks();
+ 	// fprintf (stderr, "vi_keys queda con el resultado %i\n", ts->vi_keys);
  	if (!no_connect && (uh = bind_to_af_unix()) != -1) {
  		if (!(info = create_session_info(base_session, u, &len))) goto ttt;
  		handle_trm(get_input_handle(), get_output_handle(), uh, uh, get_ctl_handle(), info, len);
***************
*** 253,262 ****
  		mem_free(info);
  		return;
  	}
- 	if ((dds.assume_cp = get_cp_index("ISO-8859-1")) == -1) dds.assume_cp = 0;
- 	load_config();
  	init_b = 1;
- 	read_bookmarks();
  	load_url_history();
  	init_cookies();
  	u = parse_options(ac - 1, av + 1);
--- 257,263 ----
diff -cr links-current/menu.c links-zoso/menu.c
*** links-current/menu.c	Wed May 31 11:11:22 2000
--- links-zoso/menu.c	Thu Jun 22 14:44:12 2000
***************
*** 367,381 ****
  	do_menu_selected(term, mi, ptr, sel);
  }
  
! unsigned char *td_labels[] = { TEXT(T_NO_FRAMES), TEXT(T_VT_100_FRAMES), TEXT(T_LINUX_OR_OS2_FRAMES), TEXT(T_KOI8R_FRAMES), TEXT(T_USE_11M), TEXT(T_RESTRICT_FRAMES_IN_CP850_852), TEXT(T_COLOR), NULL };
  
  void terminal_options(struct terminal *term, void *xxx, struct session *ses)
  {
  	struct dialog *d;
  	struct term_spec *ts = new_term_spec(term->term);
  	if (!ts) return;
! 	if (!(d = mem_alloc(sizeof(struct dialog) + 10 * sizeof(struct dialog_item)))) return;
! 	memset(d, 0, sizeof(struct dialog) + 10 * sizeof(struct dialog_item));
  	d->title = TEXT(T_TERMINAL_OPTIONS);
  	d->fn = checkbox_list_fn;
  	d->udata = td_labels;
--- 367,381 ----
  	do_menu_selected(term, mi, ptr, sel);
  }
  
! unsigned char *td_labels[] = { TEXT(T_NO_FRAMES), TEXT(T_VT_100_FRAMES), TEXT(T_LINUX_OR_OS2_FRAMES), TEXT(T_KOI8R_FRAMES), TEXT(T_USE_11M), TEXT(T_RESTRICT_FRAMES_IN_CP850_852), TEXT(T_COLOR), TEXT(T_VI_KEYS), NULL };
  
  void terminal_options(struct terminal *term, void *xxx, struct session *ses)
  {
  	struct dialog *d;
  	struct term_spec *ts = new_term_spec(term->term);
  	if (!ts) return;
! 	if (!(d = mem_alloc(sizeof(struct dialog) + 11 * sizeof(struct dialog_item)))) return;
! 	memset(d, 0, sizeof(struct dialog) + 11 * sizeof(struct dialog_item));
  	d->title = TEXT(T_TERMINAL_OPTIONS);
  	d->fn = checkbox_list_fn;
  	d->udata = td_labels;
***************
*** 413,427 ****
  	d->items[6].gid = 0;
  	d->items[6].dlen = sizeof(int);
  	d->items[6].data = (void *)&ts->col;
! 	d->items[7].type = D_BUTTON;
! 	d->items[7].gid = B_ENTER;
! 	d->items[7].fn = ok_dialog;
! 	d->items[7].text = TEXT(T_OK);
  	d->items[8].type = D_BUTTON;
! 	d->items[8].gid = B_ESC;
! 	d->items[8].fn = cancel_dialog;
! 	d->items[8].text = TEXT(T_CANCEL);
! 	d->items[9].type = D_END;
   	do_dialog(term, d, getml(d, NULL));
  }
  
--- 413,431 ----
  	d->items[6].gid = 0;
  	d->items[6].dlen = sizeof(int);
  	d->items[6].data = (void *)&ts->col;
! 	d->items[7].type = D_CHECKBOX;
! 	d->items[7].gid = 0;
! 	d->items[7].dlen = sizeof(int);
! 	d->items[7].data = (void *)&ts->vi_keys;
  	d->items[8].type = D_BUTTON;
! 	d->items[8].gid = B_ENTER;
! 	d->items[8].fn = ok_dialog;
! 	d->items[8].text = TEXT(T_OK);
! 	d->items[9].type = D_BUTTON;
! 	d->items[9].gid = B_ESC;
! 	d->items[9].fn = cancel_dialog;
! 	d->items[9].text = TEXT(T_CANCEL);
! 	d->items[10].type = D_END;
   	do_dialog(term, d, getml(d, NULL));
  }
  
diff -cr links-current/view.c links-zoso/view.c
*** links-current/view.c	Wed May 31 19:01:43 2000
--- links-zoso/view.c	Thu Jun 22 14:44:12 2000
***************
*** 1728,1735 ****
  	if (ev->ev == EV_KBD) {
  		if (ev->x == KBD_PAGE_DOWN || (ev->x == ' ' && (!ev->y || ev->y == KBD_CTRL))) rep_ev(ses, fd, page_down, 0);
  		else if (ev->x == KBD_PAGE_UP || (upcase(ev->x) == 'B' && (!ev->y || ev->y == KBD_CTRL))) rep_ev(ses, fd, page_up, 0);
! 		else if (ev->x == KBD_DOWN) rep_ev(ses, fd, down, 0);
! 		else if (ev->x == KBD_UP) rep_ev(ses, fd, up, 0);
  		/* Copy current link to clipboard */
  		else if (ev->x == KBD_INS && ev->y == KBD_CTRL || upcase(ev->x) == 'C' && ev->y == KBD_CTRL) {
  			char *current_link = print_current_link(ses);
--- 1728,1735 ----
  	if (ev->ev == EV_KBD) {
  		if (ev->x == KBD_PAGE_DOWN || (ev->x == ' ' && (!ev->y || ev->y == KBD_CTRL))) rep_ev(ses, fd, page_down, 0);
  		else if (ev->x == KBD_PAGE_UP || (upcase(ev->x) == 'B' && (!ev->y || ev->y == KBD_CTRL))) rep_ev(ses, fd, page_up, 0);
! 		else if (ev->x == KBD_DOWN || (ses->term->spec->vi_keys && ev->x == 'j')) rep_ev(ses, fd, down, 0);
! 		else if (ev->x == KBD_UP || (ses->term->spec->vi_keys && ev->x == 'k')) rep_ev(ses, fd, up, 0);
  		/* Copy current link to clipboard */
  		else if (ev->x == KBD_INS && ev->y == KBD_CTRL || upcase(ev->x) == 'C' && ev->y == KBD_CTRL) {
  			char *current_link = print_current_link(ses);
***************
*** 1744,1750 ****
  		else if (upcase(ev->x) == 'E' && ev->y == KBD_CTRL) rep_ev(ses, fd, scroll, 1);*/
  		else if (ev->x == KBD_HOME) rep_ev(ses, fd, home, 0);
  		else if (ev->x == KBD_END) rep_ev(ses, fd, x_end, 0);
! 		else if (ev->x == KBD_RIGHT || ev->x == KBD_ENTER) x = enter(ses, fd, 0);
  		else if (upcase(ev->x) == 'D' && !(ev->y & KBD_ALT)) frm_download(ses, fd);
  		else if (ev->x == '/') search_dlg(ses, fd, 0);
  		else if (ev->x == '?') search_back_dlg(ses, fd, 0);
--- 1744,1750 ----
  		else if (upcase(ev->x) == 'E' && ev->y == KBD_CTRL) rep_ev(ses, fd, scroll, 1);*/
  		else if (ev->x == KBD_HOME) rep_ev(ses, fd, home, 0);
  		else if (ev->x == KBD_END) rep_ev(ses, fd, x_end, 0);
! 		else if (ev->x == KBD_RIGHT || ev->x == KBD_ENTER || (ses->term->spec->vi_keys && ev->x == 'l')) x = enter(ses, fd, 0);
  		else if (upcase(ev->x) == 'D' && !(ev->y & KBD_ALT)) frm_download(ses, fd);
  		else if (ev->x == '/') search_dlg(ses, fd, 0);
  		else if (ev->x == '?') search_back_dlg(ses, fd, 0);
***************
*** 1925,1931 ****
  			print_screen_status(ses);
  			redraw_from_window(ses->win);*/
  		}
! 		if (ev->x == KBD_LEFT) {
  			back(ses, NULL, 0);
  			goto x;
  		}
--- 1925,1931 ----
  			print_screen_status(ses);
  			redraw_from_window(ses->win);*/
  		}
! 		if (ev->x == KBD_LEFT || (ses->term->spec->vi_keys && ev->x == 'h')) {
  			back(ses, NULL, 0);
  			goto x;
  		}