Comments (4)
ping @philj56
from vim.
I ran into this too: //
-style comments are being indented incorrectly. I worked around this by deleting /usr/share/vim/vim91/indent/asm.vim
from my system.
from vim.
@zack466 Hey, sorry for the slow response.
I think that's a pretty reasonable argument; this was a originally a very minimal-effort file for my personal use. It's included in vim because at least one other person wanted it (The original PR's at #14383).
I don't have any particularly strong opinions on it staying in or not, so if it's annoying multiple people, it's probably best off removed. It could also be modified to be much less zealous in its indenting while still achieving my original goals, by changing the GetAsmIndent
function to something like:
function! GetAsmIndent()
let line = getline(v:lnum)
" If the line is a label (starts with ':' terminated keyword),
" then don't indent
if line =~ '^\s*\k\+:'
let ind = 0
else
" If the previous line was a label, indent:
if getline(v:lnum - 1) =~ '^\s*\k\+:'
let ind = s:buffer_shiftwidth()
else
" Let autoindent handle everything else.
let ind = -1
endif
endif
return ind
endfunction
This would mean basically nothing gets touched apart from labels and the lines directly after them.
from vim.
Hm, the s:buffer_shiftwidth()
function seems undefined. Let me remove the indent script then if it causes problems.
from vim.
Related Issues (20)
- TSV runtime files are missing HOT 1
- segfault accessing list item coming from getregionpos in TextYankPost HOT 1
- Missing separator HOT 10
- Can't get '] boundary of some yanked text HOT 2
- A couple of minor corrections to the docs HOT 4
- Syntax: Mermaid-JS: Comment settings HOT 5
- "I am human" git-vim.org
- Internal error with file completion with fuzzy HOT 6
- The cursor position after wrapping with breakindent may be incorrect. HOT 1
- Tested remote debugging with Termdebug: a small report and a feature request. HOT 4
- Should fuzzy completion change the candidate list? HOT 6
- Fuzzy completion is incorrect when completeopt contains longest HOT 7
- Fuzzy completion may be affected by `set complete-=i`
- providing vim -u ~/config/vim/vimrc . won't open netrw tree HOT 10
- `vim` appears to hang with "Press ENTER or type command to continue" HOT 10
- Regression: exists(':keepalt') (and 5 more) return 0 instead of 2 (since Vim 9.1.352) HOT 4
- Incomplete Kconfig syntax highlighting
- duplicate runtime/syntax vimscript for Oracle PL/SQL HOT 3
- Allow users to swap mark positions just as with default motions HOT 5
- Some characters leave traces in GUI after popup close HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim.