every time I try to make a "yy" or a "dd" or a ":%y" to copy everything from neovim de termux to for example send my code by whatsapp I can't, I can only paste the last thing I copy by long pressing select the text and press copy, and you know that doing it in neovim or vim even the line numbers are copied, that's why I'm trying to do so that when copying I can paste it very quickly in another place on the slide
Example of the only way I can copy from there, and also there my init.vim or vimrc file:
"set directory
1 set runtimepath^=~/.vim runtimepath+=~/.vim/after
2 let &packpath = &runtimepath
3
4 "files
5 so ~\.vim/plugins.vim
6 so ~\.vim/plugin-config.vim
7 so ~\.vim/maps.vim
8
9 set list
10
11 syntax enable
12
13 "show line number and relative number
14 set nu-
15 set rnu
16 set numberwidth=1 "better show the numbers
17
18 "copy and paste with the mouse
19 set mouse=a
20
21 "enable copy and paste 'yy, p'
22 set clipboard=unnamed
23 "set clipboard+=unnamedplus
24
25 "shows the pressed
26 set showcmd
27
28 "Show current column
29 set ruler
30
31 "perform indent
32 set smartindent
33
34 "does not create external files
35 set noswapfile
36 set nobackup
37
38 "Seaching
39 "moves to result as you type
40 set incsearch
41 "distinguish between upper and lower case when searching
42 set smartcase
43 "Highlight matches
44 set hlsearch-
45 "Unless they contain at least one capital letter
46 set ignorecase-
47
48
49 "tab of 4 spaces
50 set noexpandtab
51 set tabstop=4 shiftwidth=4
52
53 "Scheme
54 colorscheme gruvbox
55 let g:gruvbox_contrast_dark = "hard"
56
57 "highlight Normal ctermbg=NONE
58 set laststatus=2
59 set noshowmode
60
61 "Fonts
62 set guifont=Hurmit_Nerd_Font_Mono:h12
63
64 "When a file is edited its indent file is loaded
65 filetype plugin indent on
I explain it in more detail, I can paste normally I do not need to use that line that tells me to use ctrl + v, when I press esc then p, I can perform a good and normal paste, however I cannot copy and paste anywhere else instead, in another application, etc.
Related
I am trying the below code used to print a webpage as pdf
IE.ExecWB 6, 2, "U:\Translations", Null
I am not sure how to specify the path name in the above syntax .
The parameters as as follows :
object.ExecWB nCmdID, nCmdExecOpt, [pvaIn], [pvaOut]
browser.ExecWB method does not have any parameter to pass the file path.
object.ExecWB nCmdID, nCmdExecOpt, [pvaIn], [pvaOut]
The ExecWB method requires an OLE Command ID to be passed in to identify the command to execute. This value nCmdID is of type Long. The nCmdExecOpt parameter represents the value for the command execution option. Together, these values instruct the control as to what supported command to execute and what degree of user prompting should occur.
The last two parameters pvaIn and paOut are optional and is usually set to either NULL or an empty string.
Here is a complete list for the 1st parameter
OLECMDID_OPEN 1 Open
OLECMDID_NEW 2 Create a new document
OLECMDID_SAVE 3 Preservation
OLECMDID_SAVEAS 4 Save as
OLECMDID_SAVECOPYAS 5
OLECMDID_PRINT 6 Print
OLECMDID_PRINTPREVIEW 7 Print preview
OLECMDID_PAGESETUP 8 Page setup
OLECMDID_SPELL 9 The spelling check
OLECMDID_PROPERTIES 10 Attribute
OLECMDID_CUT 11 Shear
OLECMDID_COPY 12 Replication
OLECMDID_PASTE 13 Paste
OLECMDID_PASTESPECIAL 14 Paste special
OLECMDID_UNDO 15 Revoke
OLECMDID_REDO 16 Repeat
OLECMDID_SELECTALL 17 Select all
OLECMDID_CLEARSELECTION 18 Clear selection
OLECMDID_ZOOM 19
OLECMDID_GETZOOMRANGE 20
OLECMDID_UPDATECOMMANDS 21 The update command
OLECMDID_REFRESH 22 Refresh
OLECMDID_STOP 23 Stop it
OLECMDID_HIDETOOLBARS 24 Hide toolbar
OLECMDID_SETPROGRESSMAX 25 Progress bar maximum
OLECMDID_SETPROGRESSPOS 26 Progress bar position
OLECMDID_SETPROGRESSTEXT 27 Progress bar text
OLECMDID_SETTITLE 28 Set the title
OLECMDID_SETDOWNLOADSTATE 29 Set download status
OLECMDID_STOPDOWNLOAD 30 Stop downloading
OLECMDID_ONTOOLBARACTIVATED 31
OLECMDID_FIND 32 Search
OLECMDID_DELETE 33 Delete
OLECMDID_HTTPEQUIV 34
OLECMDID_HTTPEQUIV_DONE 35
OLECMDID_ENABLE_INTERACTION 36 Allow the interaction
OLECMDID_ONUNLOAD 37 When uninstall
OLECMDID_PROPERTYBAG2 38
OLECMDID_PREREFRESH 39
OLECMDID_SHOWSCRIPTERROR 40
OLECMDID_SHOWMESSAGE 41 Display a message
OLECMDID_SHOWFIND 42 Display search
OLECMDID_SHOWPAGESETUP 43 Display page setup
OLECMDID_SHOWPRINT 44 Display and printing
OLECMDID_CLOSE 45 Close
OLECMDID_ALLOWUILESSSAVEAS 46
OLECMDID_DONTDOWNLOADCSS 47
OLECMDID_UPDATEPAGESTATUS 48
OLECMDID_PRINT2 49 Print 2
OLECMDID_PRINTPREVIEW2 50 Print preview
OLECMDID_SETPRINTTEMPLATE 51 Set the print template
OLECMDID_GETPRINTTEMPLATE 52 Get a print template
OLECMDID_PAGEACTIONBLOCKED 55
OLECMDID_PAGEACTIONUIQUERY 56
OLECMDID_FOCUSVIEWCONTROLS 57
OLECMDID_FOCUSVIEWCONTROLSQUERY 58
OLECMDID_SHOWPAGEACTIONMENU 59
OLECMDID_ADDTRAVELENTRY 60
OLECMDID_UPDATETRAVELENTRY 61
OLECMDID_UPDATEBACKFORWARDSTATE 62
OLECMDID_OPTICAL_ZOOM 63
OLECMDID_OPTICAL_GETZOOMRANGE 64
OLECMDID_WINDOWSTATECHANGED 65 windows status change
Here is a complete list for the 2nd parameter
OLECMDEXECOPT_DODEFAULT 0 Default parameters
OLECMDEXECOPT_PROMPTUSER 1 Prompt the user, namely the pop-up dialog box
LECMDEXECOPT_DONTPROMPTUSER 2 User is not prompted
OLECMDEXECOPT_SHOWHELP 3 displays help
IE.ExecWB method can be used to print the web page as PDF but it will prompt the user to select the folder and ask the file name to save it.
This method does not have any parameter to pass the file path. So if you are looking for using the path written in your code than you need to change your logic and modify your code based on that.
References:
(1) ExecWB method
(2) Microsoft Internet Controls
I'm using Vim 8.0, and when I browse the vim help files using CTRL-] to jump around, I find that trying to go back through the jumplist using CTRL-O works fine when the Old positions are in the current file, but things break as soon as I try to CTRL-O to an old position in a previous file. Somehow this gets treated as a jump itself, and instead of going back in the jumplist, a whole new entry is added to the jumplist instead.
The following is an example to illustrate. Suppose I was jumping around in motion.txt.gz, and then followed a link to map.txt.gz using CTRL-] and jumped around in that file. Then my jump list might look like this:
:jump
jump line col file/text
9 1 0 help.txt
8 1 0 motion.txt.gz
7 313 19 motion.txt.gz
6 75 6 motion.txt.gz
5 87 6 motion.txt.gz
4 96 64 motion.txt.gz
3 1 0 *map.txt* For Vim version 8.0. Last change: 2017 Mar 10
2 56 23 :lm[ap]^I{lhs} {rhs}^I^I|mapmode-l|^I^I*:lm* *:lmap*
1 361 12 *omap-info*
>
Great! So far so good. But now I want to use CTRL-O to navigate back through the jump list, one-by-one, say all the way back to #7 above (line 313 col 19 in motion.txt.gz). I find that CTRL-O will work fine all the way to #3 above, like so:
:jump
jump line col file/text
6 1 0 help.txt
5 1 0 motion.txt.gz
4 313 19 motion.txt.gz
3 75 6 motion.txt.gz
2 87 6 motion.txt.gz
1 96 64 motion.txt.gz
> 0 1 0 *map.txt* For Vim version 8.0. Last change: 2017 Mar 10
1 56 23 :lm[ap]^I{lhs} {rhs}^I^I|mapmode-l|^I^I*:lm* *:lmap*
2 361 7 *omap-info*
But then the next CTRL-O does something I did not expect. Instead of moving me up one more position in the jump list, vim mysteriously treats my action as a jump from the beginning of motion.txt to line 96 col 64 of motion.txt, thus adding the beginning of motion.txt to the end of the jump list (and, by rules of the vim jump list, removing its duplicate from the list):
:jump
jump line col file/text
9 1 0 help.txt
8 313 19 character |linewise|.
7 75 6 *exclusive* *inclusive*
6 87 6 *exclusive-linewise*
5 96 64 motion isn't yet), a special set of mappings can be used. See |:omap|.
4 1 0 map.txt.gz
3 56 23 map.txt.gz
2 361 7 map.txt.gz
1 1 0 *motion.txt* For Vim version 8.0. Last change: 2017 Mar 12
>
While the end result is that I am indeed at line 96 col 64 of motion.txt (not shown by the >), the problem is that my jump history is now fudged. In fact the problem repeats itself with continued use of CTRL-O from #1 above to #2 above (the top of map.txt is added and I end up at line 361 col 7 of map.txt). Basically, I am unable to navigate back to line 313 col 19 of motion.txt as I had originally wanted to.
Would really love to understand what is causing this behavior. I think I've been encountering this problem repeatedly in vim for years and just never looked into it. I hope to finally find an answer. Thanks for any help!
It seems to happen after I installed YCM. I also have Python-mode plugin installed because I like the lint and "run inside vim" feature, but I turned off "rope". My YCM settings are like below.
31 " Use gcc syntastic checker
30 let g:ycm_show_diagnostics_ui = 0
29
28 " Skip checking of ycm config file at vim startup
27 let g:ycm_confirm_extra_conf=0
26
25 " Includes tags in completion
24 let g:ycm_collect_identifiers_from_tags_files=1
23
22 " Include text in comments and strings
21 let g:ycm_collect_identifiers_from_comments_and_strings = 0
20
19 " Start completion from second char
18 let g:ycm_min_num_of_chars_for_completion=2
17
16 " Disable chache, rebuild every time
15 let g:ycm_cache_omnifunc=1
14
13 " Enable syntax based completion
12 let g:ycm_seed_identifiers_with_syntax=1
11
10 " Enable completion while in comments
9 let g:ycm_complete_in_comments = 1
8
7 " Enable completion while in strings
6 let g:ycm_complete_in_strings = 1
I tried to profile vim, but I don't get a clue from the result. Below is my profiling report.
0 FUNCTIONS SORTED ON SELF TIME
1 count total (s) self (s) function
2 60 0.883352 0.782989 <SNR>93_GetCompletions()
3 2967 0.905869 0.579009 pymode#folding#expr()
4 1997 0.275032 <SNR>110_BlockStart()
5 302 0.168611 <SNR>93_Pyeval()
6 120 0.968933 0.066387 youcompleteme#Complete()
7 1997 0.051828 <SNR>110_BlockEnd()
8 76 0.030649 0.028957 <SNR>97_GetNearbyTag()
9 154 0.026513 <SNR>69_Highlight_Matching_Pair()
10 61 0.025747 <SNR>93_InsideCommentOrString()
11 61 0.057955 0.016587 <SNR>93_IdentifierFinishedOperations()
12 6 0.013762 0.013707 <SNR>93_OnFileReadyToParse()
13 60 0.012566 <SNR>93_OnCompleteDone()
14 4 0.011961 <SNR>143_SearchParensPair()
15 74 0.040687 0.010170 Powerline#Functions#fugitive#GetBranch()
16 76 0.114571 0.009806 <SNR>93_OnCursorMovedInsertMode()
17 2 0.006829 0.006792 SyntasticRefreshCursor()
18 61 0.040498 0.005477 <SNR>93_InvokeCompletion()
19 74 0.005211 308()
20 91 0.004580 Pl#Statusline()
21 74 0.005954 0.004241 <SNR>59_buffer_spec()
Vim doesn't stand asynchronous job control and is basically mono-thread, so he can only do one thing after the other.
You can't type text while YCM is working.
You should try NeoVim who stand it, it won't solve your problem but will minimize it.
I am mac user. When I'm using Vim in the termianl autoindent does not work at all.
Indentation only works when I tab in manually, through next line.
I already apply autoindent, cindent like that. Here is my .vimrc code. I really need your help.
1 " 환경설정
2 syntax on
3
4 set nu
5 set hi=100
6 set ru
7 set mps+=<:>
8 set backup
9 syntax enable
10 colorscheme desert
11 set history=50
12 set visualbell
13 set noerrorbells
14 set loadplugins
15
16 set encoding=utf-8
17 set fileencodings=utf-8,cp949,default,latinl
18 set termencoding=utf-8
19 set printencoding=utf-8
20 set printmbcharset=ISO10646
21
22 " Editing
23 set paste
24 set tabstop=4
25 set softtabstop=4
26 set shiftwidth=4
27 set showmatch
28 set autowrite
29 set autoindent
30 set cursorline
31 set showcmd "show commandline
32 set title "show title
33 set statusline=\ %<%l:%v\ [%P]%=%a\ %h%m%r\ %F\ " 다중 문서 작업을 >>
위한 Status 줄
34 set km=startsel,stopsel "shift키로 선택 영역 만들기 허용
35 " 영역 상태에서 ctrl+f, b 로 이동하면 영역 해제
36
37 set smartindent
38 set expandtab
39 set cindent
40 set autoindent
41 set textwidth=80 " if it is over 80 char
42 set wrap " then it warped next line
43 set nobackup
44 set shiftwidth=4 "autoindent at 4 line
45 set ignorecase " no large-small character difference when it is searched
46 set laststatus=2
47
48 " window
49 set ruler "show cursor position
50
51 " macro
52 map <F2> :tabnew<CR>
53 map <F4> :w<CR>
54
55 " c 파일의 경우 Makefile이 없으면 gcc를 불러줌
56 au BufRead,BufNewFile *.c
57 \ if !filereadable("Makefile") && !filereadable("makefile") |
58 \ set makeprg=gcc\ %\ -o\ %< |
59 \ endif
60
61 " cpp 파일의 경우 Makefile 이 없으면 g++를 불러줌
62 au BufRead,BufNewFile *.cpp
63 \ if !filereadable("Makefile") && !filereadable("makefile") |
64 \ set makeprg=g++\ %\ -o\ %< |
65 \ endif
66
67 " java 파일의 경우 Makefile 이 없으면 javac를 불러줌
68 au BufRead,BufNewFile *.java
69 \ if !filereadable("Makefile") && !filereadable("makefile") |
70 \ set makeprg=javac\ % |
71 \ endif
72
73 " 지난번 편집했던 곳으로 Jump
74 au BufReadPost *
75 \ if line("'\"") > 0 && line("'\"") <= line("$") |
76 \ exe "normal g`\"" |
77 \ endif
Remove set paste. Paste mode will effectively disable indentation.
How can I right align (and left align?) a block of numbers or text in vim like this:
from:
45 209 25 1
2 4 2 3
34 5 300 5
34 120 34 12
to this:
45 209 25 1
2 4 2 3
34 5 300 5
34 120 34 12
That means the biggest number or greatest string in every column doesn't move.
In the first column it is 45+34, in the second column 209+120, in the third column 300 and in the last column 12.
Have a look at the align plugin, it can do this and much more. Great tool in your utility belt!
Found here
After some serious vimhelp/reading I found the correct AlignCtrl mapping...
Visually select the table, e.g. by using ggVG, then do a \Tsp i.e. <leader>Tsp
Then I get this:
45 209 25 1
2 4 2 3
34 5 300 5
34 120 34 12
From vimhelp:
\Tsp : use Align to make a table separated by blanks |alignmap-Tsp|
(right justified)
You can look into the Tabularize plugin. So if you have something like
45 209 25 1
2 4 2 3
34 5 300 5
34 120 34 12
just select those lines in the visual mode and type :Tab/ and it will format it as
45 209 25 1
2 4 2 3
34 5 300 5
34 120 34 12
Also, it looks like you don't have an equal number of spaces separating the numbers at the moment. So before you use the plugin, replace all the multiple spaces with a single space with the following regex:
%s![^ ]\zs \+! !g
With the Align plugin you can select the rows you want to align and hit :
<Leader>Tsp
From Align.txt
\Tsp : use Align to make a table separated by blanks |alignmap-Tsp|
(right justified)
(The help mention \ because it is the default leader but in case you have changed it to something else you must adapt accordingly)
Just trying on my install, I got the following result :
45 209 25 1
2 4 2 3
34 5 300 5
34 120 34 12
In my opinion Align plugin is great but the "align maps" and various commands are not really easy to remember.
With the Align and AlignMaps plugins: select using V, then \anum (AlignMaps comes with Align). One advantage of \anum is that it also handles decimal points (commas) and scientific notation.
I think the best thing to do is to first eat all multiple spaces with
:{range}s/ \+/ /g
And then call Tabularize
:Tab / /r1
Or change that r to l.