6月13号是什么星座
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Results tagged with vimscript
Search options not deleted
user 10189
百度 社会稳定和长治久安是习近平总书记明确的新疆工作的总目标,推动党中央治疆方略落地生根,必须坚持以总目标为统领。
A scripting language embedded into Vim. It can be used to customize Vim to suit your needs and to create plugins. Also called VimL.
0
votes
2
answers
150
views
Swap selected block of code upward/downward?
I want to write a Vim Script which can achieve the following function, which is my favorite feature in some IDE. Say I have the following example code:
I'm a line and I just stay here.
I'm another lin …
1
vote
How to check last char is { in vimscript?
After some search this work(, but might be simplified further):
" My try
inoremap <silent><expr> <CR>
\ <SID>if_open_curly_on_left()? "\<CR>}\<ESC>O":
\ "\<CR>"
function! s:if_open_curly_on_le …
-1
votes
1
answer
59
views
What's the meaning of `^=` in vimscript?
What's the meaning of ^= in the following line?
set runtimepath^=~/.vim
This should be a simple one but I've searched and found nothing. Thanks for your help.
0
votes
1
answer
415
views
How to count the total number of splits opened in the current tab?
As title. I want to detect the case when there is only one split in the current tab.
1
vote
2
answers
168
views
How to count the total number of windows excluding some buftype?
As title. Some floating windows will have buffer type (buftype) value nofile, I don't want to count them! How?
0
votes
2
answers
1k
views
How to get the parent path of a given path?
As title. For example if I have this:
foo/bar/baz/bee
which is stored in a variable, then which function should I call to get:
foo/bar/baz
Notice that I will need to store this result back to the va …
0
votes
How to get the parent path of a given path?
I put my self-answer here since I've dived into my problem and solved it before I saw the answer post here.
This is a workaround, in Lua:
local raw_path = 'foo/bar/baz/bee'
vim.cmd('cd '..raw_path..'/ …
1
vote
1
answer
42
views
Where is the `end_lnum` field of the item in `setqflist`?
As title. In :h setqflist there is no field end_lnum and end_col. While these options exist in :h getqflist . So my question is simple: If I cannot set it, how can I get it?
1
vote
1
answer
82
views
How to detect the previous buffer via '#' exist?
As title. I'm trying to call bd # while it fails when the previous buffer doesn't exist. So my question is how to detect this?
2
votes
1
answer
1k
views
How to get file type by buffer number?
As title. Currently, I only have the buffer number, I need to know which filetype it is.
1
vote
1
answer
132
views
Is it possible to only change the guibg of the current window?
As title. Say I have 2 (vertical) window splits, I just want to change the background color of the right one. Is this even possible? If so, How?
1
vote
1
answer
180
views
Re-Select Previous Visual Selection with Command
As title. I want to create a function that facilitate this behaviour. I have tried this but it didn't work:
exe 'gv'
I tried from this direction because this works:
exe 'c!'
2
votes
1
answer
293
views
How to use `%` to jump between single quotes?
As title. I have tried change this option:
matchpairs
but the result is weird: it will jump to all previous ' if pressed multiple times
1
vote
1
answer
136
views
Is it possible to only change the font size of the current window?
As title. Say I have two vertical splits, and I only want to increase the font size of the right split. Is this possible? If so:
What's the API to get the current font size?
What's the API to set the …
2
votes
1
answer
259
views
How to create window split for the current tab?
As title. Say I have three splits top, middle, bottom. I want to create a new split from the bottom(so the result will be top, middle, bottom, new_bottom), even if my current is at either top or middl …