Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[vim] Visual-Mode legt Daten in der Zwischenablage
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2926
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Fri Aug 28, 2009 7:27 pm    Post subject: [vim] Visual-Mode legt Daten in der Zwischenablage Reply with quote

Hi

ich sitze an der Arbeit an einem Debian testing, aber ich habe von zu Hause (gentoo) eine .vimrc rüberkopiert und bis jetzt hat sich alles wie gewohnt verhalten. Doch jetzt fällt mir etwas auf, was in der gentoo Installation anders läuft als bei dei debian: Wenn ich etwas mit dem Visual Modus wähle und dann (ohne 'y' zu drücken oder so) die mittlere Maustaste drücke, dann wird das, was mit dem Visual-Modus ausgewählt wurde hinzugefügt, und nicht das, was ich vorhin mit der Maus ausgewählt habe. Das ist blöd für mich, weil ich öfters zuerst etwas mit der Maus markiere, in ein anderes Tab wechsle, dann Visual-Block verwende, und dann ersetze ich den Block mit dem, was ich mit der Maus ausgewählt habe.

:set liefert

Code:

:set
--- Options ---
  autoindent          history=50          number              shiftwidth=4        tabstop=4
  cindent             hlsearch            pastetoggle=<F10>   showcmd             ttyfast
  filetype=cpp        incsearch           ruler               showmatch           ttymouse=xterm2
  helplang=en         laststatus=2        scroll=23           syntax=cpp          wildmenu
  backspace=indent,eol,start
  comments=sO:* -,mO:*  ,exO:*/,s1:/*,mb:*,ex:*/,://
  completeopt=menuone
  fileencoding=utf-8
  fileencodings=ucs-bom,utf-8,default,latin1
  formatoptions=ncroql
  omnifunc=omni#cpp#complete#Main
  printoptions=paper:a4
  runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,/var/lib/
vim/addons/after,~/.vim/after
  sessionoptions=blank,buffers,curdir,folds,help,resize,tabpages,winsize
  suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc


sieht alles irgendwie gleich wie bei mir zu Hause. Wie kann ich mein gewohntes Verhalten wieder einschalten? Sprich: Visual-Mode darf keine Daten in die Zwischenablage speichern.

Danke
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Fri Aug 28, 2009 7:54 pm    Post subject: Reply with quote

:set guioptions -= a schaltet ab, dass text im visual mode automatisch in die Zwischenablage kommt. Bei mir macht aber auch das Markieren mit der Maus nix anderes, als in den visual mode zu gehen. Um das zu ändern, soll man :set selectmode=mouse benutzen, was dann statt Visualmode den Selectmode benutzt. Und in der Theorie soll man dann mit :set guioptions +=A einstellen, dass aus dem Select-Mode alles in die Zwischenablage geschmissen wird. Aber letzteres funktioniert bei mir komischerweise net.
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2926
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Fri Aug 28, 2009 9:24 pm    Post subject: Reply with quote

also :set guioptions-=a hat bei mir meine Auswirkung gehabt. Alles, was ich im Visual-Mode markieren, kommt in die Zwischenablage. Ich habe extra set mouse= (leer), damit das markieren der Maus nicht in den Visual-Modus wechselt.
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Fri Aug 28, 2009 9:26 pm    Post subject: Reply with quote

Passiert das Verhalten denn eigentlich im gVim (wovon ich ausging) oder im Terminal-Vim?
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2926
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Fri Aug 28, 2009 9:30 pm    Post subject: Reply with quote

in der Konsole (also kein gvim)
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Fri Aug 28, 2009 10:02 pm    Post subject: Reply with quote

Ok - denn sind meine allerersten Vorschläge sinnlos ...

aber die Lösung deines Problems: Die Option clipboard darf nicht autoselect enthalten. Also sie zB auf autoselectml setzen. (:help 'cb für Details)
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2926
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Fri Aug 28, 2009 11:04 pm    Post subject: Reply with quote

hi

vielleicht leigt an der Uhrzeit, aber irgendwie kann ich damit nicht viel anfangen. Ein :set clipboard=autoselectml bringt gar nichts. Auch ein :set clipboard? sagt mir Option not supported. :cry:
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Fri Aug 28, 2009 11:10 pm    Post subject: Reply with quote

was sagt :version ?
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2926
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Sat Aug 29, 2009 10:18 am    Post subject: Reply with quote

Necoro wrote:
was sagt :version ?


bin jetzt nicht im Büro :( ich kann es am Montag erst ausprobieren.

Ich wollte aber dieses Verhalten bei meinem Gentoo testen, da konnte ich diese Option auch nicht verwenden.

:version

Code:

VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jul 17 2009 18:15:09)
Included patches: 1-182
Modified by Gentoo-7.2.182
Compiled by supertux@supertux
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv -cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float
+folding -footer +fork() -gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang
-mzscheme -netbeans_intg -osfiletype +path_extra +perl +postscript +printer +profile +python +quickfix +reltime +rightleft -ruby +scrollbind +signs
+smartindent -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
   system vimrc file: "/etc/vim/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: i686-pc-linux-gnu-gcc -c -I. -Iproto -DHAVE_CONFIG_H     -march=pentium4 -O2 -pipe -D_FORTIFY_SOURCE=1    -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS
=64  -I/usr/lib/perl5/5.8.8/i686-linux/CORE  -I/usr/include/python2.5 -pthread
Linking: i686-pc-linux-gnu-gcc   -rdynamic  -Wl,-O1 -L/usr/local/lib -o vim       -lcurses -lgpm   -rdynamic  -L/usr/local/lib /usr/lib/perl5/5.8.8/i686-linux
/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.8.8/i686-linux/CORE -lperl -lutil -lc -L/usr/lib/python2.5/config -lpython2.5 -lutil -lm -Xlinker -export-dyn
amic



wenn ich da richtig sehe, steht '-clipboard', was einiges erklären würde.

Code:

$ emerge vim vim-core -pv
[ebuild   R   ] app-editors/vim-core-7.2.182  USE="bash-completion -acl -livecd -nls" 9,335 kB
[ebuild   R   ] app-editors/vim-7.2.182  USE="bash-completion gpm perl python vim-pager -acl -cscope -minimal -nls -ruby -vim-with-x" 0 kB

_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Sat Aug 29, 2009 10:37 am    Post subject: Reply with quote

Ok - dass dein Vim unter Gentoo so funktioniert, wie es funktioniert, liegt am nicht gesetzten vim-with-x Useflag :). Wenn das nicht gesetzt ist, hat es gar keine Möglichkeit, sich zur X-Zwischenablage zu verbinden (auch sichtbar am "-X11").

Du kannst mit deinem Vim unter Debian das gleiche Verhalten erzeugen, indem du vim mit der Option "-X" startest ...
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2926
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Sat Aug 29, 2009 1:39 pm    Post subject: Reply with quote

ok, danke für den Tipp. Ich werde es ausprobieren, sobald ich wieder im Büro bin.
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2926
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Tue Sep 01, 2009 8:32 am    Post subject: Reply with quote

hi

hab vergessen zu posten. Mit 'set clipboard=autoselectml' hat es wunderbar getan.
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3333
Location: de

PostPosted: Sun Jan 13, 2013 8:47 am    Post subject: Reply with quote

Necoro wrote:
Bei mir macht aber auch das Markieren mit der Maus nix anderes, als in den visual mode zu gehen. Um das zu ändern, soll man :set selectmode=mouse benutzen, was dann statt Visualmode den Selectmode benutzt.

Nach 4 Jahren kram ich den Thread mal wieder hoch, um einfach Danke zu sagen. Danach hab ich ewig gesucht.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum