Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 24/07/2019, à 17:31

zephyre123

impossible d'utiliser les snippets confifguration vim

Bonjour,

Je viens de télécharger le plugin snippet pour vim.
Cependant celui ci ne fonctionne pas comme dans cette vidéos ou l'on se sert de la touche tabulation pour faire un snippet https://www.youtube.com/watch?v=xV2IsE5OHd4
Je pense que je l'utilise mal. lorsque je tape main par exemple pour un fichier.c il me fait une simple tabulation.
Pourtant tout semble bien configurer.
J'ai bien l'installation dans bundle des snippets voir photo http://pix.toile-libre.org/?img=1563986014.png
Es ce que quelqu'un peut m'aider ?
Merci pour votre aide.

Et une derniere question bien que l'option mouse-=a qui permet d'activer la souris je ne peut pas utiliser la molette pour descendre dans le fichier je suis obliger de me servir de ctrl-b et ctrl-f c'est un peu chiant.
Je suis débutant en informatique.

Ci dessous une copie de mon vimrc

 nocompatible
  2 set nocompatible      " necessary
  3 filetype off          " necessary
  4 
  5 " Plugin  vundle
  6 "-----------------------------------------------------------
  7 
  8 " Ajout de Vundle au runtime path et initialisation
  9 set rtp+=~/.vim/bundle/Vundle.vim
 10 call vundle#begin()
 11 
 12 " we indicate to vundle self mangagement (vundle autogéré)
 13 Plugin 'gmarik/Vundle.vim'
 14 Plugin 'itchyny/lightline.vim'
 15 Plugin 'http://github.com/VundleVim/Vundle.Vim'
 16 Plugin 'jiangmiao/auto-pairs'
 17 Plugin 'honza/vim-snippets'
 18 Plugin 'vim-syntastic/syntastic'
 19 
 20 call vundle#end()            " Nécessaire
 21 filetype plugin indent on    " Nécessaire
 22 
 23 
 24 
 25 "-----------------------------------------------------------
 26 " Must have options
 27 "
 28 " These are highly recommended options.
 29 
 30 " Vim with default settings does not allow easy switching between multiple files
 31 " in the same editor window. Users can use multiple split windows or multiple
 32 " tab pages to edit multiple files, but it is still best to enable an option to
 33 " allow easier switching between files.
 34 "
 35 " One such option is the 'hidden' option, which allows you to re-use the same
 36 " window and switch from an unsaved buffer without saving it first. Also allows
 37 " you to keep an undo history for multiple files when re-using the same window
 38 " in this way. Note that using persistent undo also lets you undo in multiple
 39 " files even in the same window, but is less efficient and is actually designed
 40 " for keeping undo history after closing Vim entirely. Vim will complain if you
 41 " try to quit without saving, and swap files will keep you safe if your computer
 42 " crashes.
 43 set hidden
 44 
 45 " Note that not everyone likes working this way (with the hidden option).
 46 " Alternatives include using tabs or split windows instead of re-using the same
 47 " window as mentioned above, and/or either of the following options:
 48 " set confirm
 49 " set autowriteall
 50 
 51 " Better command-line completion
 52 set wildmenu
 53 
 54 " Show partial commands in the last line of the screen
 55 set showcmd
 56 
 57 " Highlight searches (use <C-L> to temporarily turn off highlighting; see the
 58 " mapping of <C-L> below)
 59 set hlsearch
 60 
 61 " Modelines have historically been a source of security vulnerabilities. As
 62 " such, it may be a good idea to disable them and use the securemodelines
 63 " script, <http://www.vim.org/scripts/script.php?script_id=1876>.
 64 " set nomodeline
 65 
 66 
 67 "------------------------------------------------------------
 68 " Usability options {{{1
 69 "
 70 " These are options that users frequently set in their .vimrc. Some of them
 71 " change Vim's behaviour in ways which deviate from the true Vi way, but
 72 " which are considered to add usability. Which, if any, of these options to
 73 " use is very much a personal preference, but they are harmless.
 74 
 75 " Use case insensitive search, except when using capital letters
 76 set ignorecase
 77 set smartcase
 78 
 79 " Allow backspacing over autoindent, line breaks and start of insert action
 80 set backspace=indent,eol,start
 81 
 82 " When opening a new line and no filetype-specific indenting is enabled, keep
 83 " the same indent as the line you're currently on. Useful for READMEs, etc.
 84 set autoindent
 85 
 86 " Stop certain movements from always going to the first character of a line.
 87 " While this behaviour deviates from that of Vi, it does what most users
 88 " coming from other editors would expect.
 89 set nostartofline
 90 
 91 " Display the cursor position on the last line of the screen or in the status
 92 " line of a window
 93 set ruler
 94 
 95 " Always display the status line, even if only one window is displayed
 96 set laststatus=2
 97 
 98 " Instead of failing a command because of unsaved changes, instead raise a
 99 " dialogue asking if you wish to save changed files.
100 set confirm
101 
102 " Use visual bell instead of beeping when doing something wrong
103 set visualbell
104 
105 " And reset the terminal code for the visual bell. If visualbell is set, and
106 " this line is also included, vim will neither flash nor beep. If visualbell
107 " is unset, this does nothing.
108 set t_vb=
109 
110 " Enable use of the mouse for all modes
111 set mouse-=a
112 
113 " Set the command window height to 2 lines, to avoid many cases of having to
114 " "press <Enter> to continue"
115 set cmdheight=2
116 
117 " Display line numbers on the left
118 set number
119 
120 " Quickly time out on keycodes, but never time out on mappings
121 set notimeout ttimeout ttimeoutlen=200
122 
123 " Use <F11> to toggle between 'paste' and 'nopaste'
124 set pastetoggle=<F11>
125 
126 
127 "------------------------------------------------------------
128 " Indentation options {{{1
129 "
130 " Indentation settings according to personal preference.
131 
132 " Indentation settings for using 4 spaces instead of tabs.
133 " Do not change 'tabstop' from its default value of 8 with this setup.
134 set shiftwidth=4
135 set softtabstop=4
136 set expandtab
137 
138 " Indentation settings for using hard tabs for indent. Display tabs as
139 " four characters wide.
140 "set shiftwidth=4
141 "set tabstop=4
142 
143 
144 "------------------------------------------------------------
145 " Mappings {{{1
146 "
147 :imap jj <ESC>
148 "Navigation panel
149 nnoremap <Down> <C-W><C-J>
150 nnoremap <Up> <C-W><C-K>
151 nnoremap <Right> <C-W><C-L>
152 nnoremap <Left> <C-W><C-H>

Hors ligne

#2 Le 28/07/2019, à 15:37

zephyre123

Re : impossible d'utiliser les snippets confifguration vim

J'ai trouvé pour copier du texte en dehors de vim dans vim avec le paramètre set mouse=a il suffit de maintenir la touche shift.
Je l'ai trouvé par hasard. J'espère que cela en aidera plus d'un.
Par contre je suis toujours bloqué concernant les snippets j'ai cherché pendant plusieurs jours et je n'ai rien trouvé qui puisse m'aider sur google.

Hors ligne